okta / okta-sdk-php

PHP SDK for the Okta API
Apache License 2.0
38 stars 71 forks source link

Group IT - Group User Operations #21

Closed bretterer closed 4 years ago

bretterer commented 7 years ago
  1. Create a user with credentials → POST /api/v1/users?activate=false
    const newUser = {
    profile: {
        firstName: 'John',
        lastName: 'With-Group',
        email: 'john-with-group@example.com',
        login: 'john-with-group@example.com'
    },
    credentials: {
        password: { value: 'Abcd1234' }
    }
    };
  2. Create a new group → POST /api/v1/groups
    const newGroup = {
    profile: {
        name: 'Group-Member API Test Group'
    }
    };
  3. Add user to the group and validate user present in group → POST /api/v1/groups/{{groupId}}/users/{{userId}} + GET /api/v1/groups/{{groupId}}/users
  4. Remove user from group and validate user removed → DELETE /api/v1/groups/{{groupId}}/users/{{userId}} + GET /api/v1/groups/{{groupId}}/users
  5. Delete the group and user → POST /api/v1/users/{{userId}}/lifecycle/deactivate + DELETE /api/v1/users/{{userId}} + DELETE /api/v1/groups/{{groupId}}