Invalid tenant domain of user error when use scim2 API

  • 6 February 2022
  • 1 reply

Userlevel 1

Hello dears,

When I am hitting I got the following error

"schemas": [
"detail": "Invalid tenant domain of user USER_NAME",
"status": 401

I am using Basic Auth with Collaborator username/password which has Administrator permission


Best answer by dimuthuk 7 February 2022, 08:26

View original

1 reply

Userlevel 3

Hi ismail,


The recommended way to invoke the SCIM  endpoints is by retrieving a token using client credentials grant and using it to invoke the APIs. The documentation with these details will be published soon.

You can follow below steps to invoke the SCIM /Users endpoints. I have shared a sample postman collection with this. 


1. First create a Standard-based/Traditional web application with OpenID Connect protocol in the Asgardeo organization using the Asgardeo console.

2. Go to the Protocol tab and tick the Client Credentials grant type listed in the Allowed grant types section.

3. copy the clientID and clientSecret values from the same protocol tab.

4. Import this collection to the postman. This collection has sample GET /UsersGET /Users/UUID, POST /Users endpoints and  the /token endpoint to retrieve access token. 

5. Update the BaseURL in the collection variables.

6. Update the clientID, clientSecret, scope sections in the token request with the correct values. 

Required scopes for each endpoint will be as follows. 

  • GET /Users - internal_user_mgt_list
  • POST /Users - internal_user_mgt_create
  • GET /Users/UUID - internal_user_mgt_view

Screenshot 2022-01-27 at 13.03.17.png

7. Retrieve the access_token from the response and use it to invoke your API endpoints.