Removing Users

Server Calls for Disassociating a User from Tenant#

1. Get Auth Token#

POST {{user_server_url}}/v2/oauth2/oauth/token?scope=SCOPE_TENANT_ADMIN&grant_type=client_credentials

curl --location --request POST '{{user_server_url}}/v2/oauth2/oauth/token?scope=SCOPE_TENANT_ADMIN&grant_type=client_credentials' \
--header 'Authorization: Basic {{auth_credentials}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw ''

2. Get User Data by UserID#

GET {{gmi_server_url}}/v2/gmiserver/person?userId={{user_id}}

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/person?userId={{user_id}}' \
--header 'Authorization: Bearer {{token}}'

3. Disassociate a User from Tenant#

DELETE {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}

curl --location --request DELETE '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}' \
--header 'Authorization: Bearer {{token}}' \
--data-raw ''

Server Calls for Deleting a User#

1. Get Auth Token#

POST {{user_server_url}}/v2/oauth2/oauth/token?scope=SCOPE_TENANT_ADMIN&grant_type=client_credentials

curl --location --request POST '{{user_server_url}}/v2/oauth2/oauth/token?scope=SCOPE_TENANT_ADMIN&grant_type=client_credentials' \
--header 'Authorization: Basic {{auth_credentials}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw ''

2. Get User Data by UserID#

GET {{gmi_server_url}}/v2/gmiserver/person?userId={{user_id}}

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/person?userId={{user_id}}' \
--header 'Authorization: Bearer {{token}}'
note

It'is important to only delete this user if they are no longer associated with any other tenant#

3. Get List of Tenants for User#

GET {{gmi_server_url}}/v2/gmiserver/person/{{person_uuid}}/tenant

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/person/{{person_uuid}}/tenant' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw ''

4. Delete the User#

DELETE {{gmi_server_url}}/v2/gmiserver/person/{{person_uuid}}

curl --location --request DELETE '{{gmi_server_url}}/v2/gmiserver/person/{{person_uuid}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw ''