okta / okta-sdk-php

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

User IT - Suspend User #26

Closed bretterer closed 4 years ago

bretterer commented 7 years ago
  1. Create a user with credentials, activated by default → POST /api/v1/users?activate=true
    const newUser = {
    profile: {
        firstName: 'John',
        lastName: 'Suspend',
        email: 'john-suspend@example.com',
        login: 'john-suspend@example.com'
    },
    credentials: {
        password: { value: 'Abcd1234' }
    }
    };
  2. Suspend the user → POST /api/v1/users/{{userId}}/lifecycle/suspend
  3. Verify that user is in the list of suspended users → GET /api/v1/users?filter=status eq "SUSPENDED"
  4. Unsuspend the user → POST /api/v1/users/{{userId}}/lifecycle/unsuspend
  5. Verify that user is in the list of active users → GET /api/v1/users?filter=status eq "ACTIVE" 6, Deactivate & delete the user → POST /api/v1/users/{{userId}}/lifecycle/deactivate + DELETE /api/v1/users/{{userId}}