Get members of groups through the SCIM API

ECCBV
New Contributor II

For some reason the SCIM API endpoint to get all the groups doesn't return any members information.

According to the docs it should contain all members that are part of a group.

Anyone know how to fix this?

szymon_dybczak
Esteemed Contributor III

Hi @ECCBV ,

Which endpoint do you use? The following one will list for you all groups:

List groups

/api/2.1/accounts/{account_id}/scim/v2/Groups

 

szymon_dybczak_0-1764583823626.png

Now, if you want to list a members of the group you need to use following endpoint and provide group_id parameter:

Get group details

/api/2.1/accounts/{account_id}/scim/v2/Groups/{id}

szymon_dybczak_1-1764583906913.png

 

 

I use this endpoint:

GET  /api/2.0/preview/scim/v2/Groups

According to the docs this should also return the members portion. List group details. | Groups API | REST API reference | Azure Databricks

szymon_dybczak
Esteemed Contributor III

There's a mismatch in documentation between Account SCIM 2.1 Documentation and the link you've provided:

szymon_dybczak_0-1764584884415.png

Anyway, you can obtain members for each group using /api/2.1/accounts/{account_id}/scim/v2/Groups/{id}.
Just iterate over group ids that you can obtain via this endpoint /api/2.0/preview/scim/v2/Groups and pass group_id as a parameter.

View solution in original post

Another thing you can try is to use attributes query parameter to explicitly list members attribute in your response when you're making a call to /api/2.0/preview/scim/v2/Groups

szymon_dybczak_1-1764585140748.png