Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Multiple calls in REST API to import User

AtrayeeDutta
Regular Contributor
Regular Contributor

Hi Everyone,

We are trying to import user from graph API, where we first want to get groups based on filter and then in second call the members associated to that group and create users.

it will require multiple call and iteration on each group. Attached is the JSON format which we tried but it is not working.

We have tried response.call1.id, $userIdentifier but it didn;t worked

 

1. First call has to be to fetch group

"https://graph.microsoft.com/v1.0/groups?$filter=(displayName+in+('Test'))"

response:

 

 "value": [
        {
            "id": "09xxx0e"
}.
{
            "id": "02xxxxs"
}
 
2. Now for above two id values we want to pass in next call
https://graph.microsoft.com/v1.0/groups/09xxx0e/members/microsoft.graph.user?$count=true&$orderby=displayName&$filter=userType+eq+'Guest'&$select=Id,userPrincipalName
 
But it is not working.
Hardcoding group in call 2 does work but we need iterated run 
3 REPLIES 3

shivmano
Regular Contributor III
Regular Contributor III

@AtrayeeDutta  - I think the userIdentifier works only to fetch users in first call and iterate through imported users in 2nd call to fetch additional attributes

SB
Saviynt Employee
Saviynt Employee

@AtrayeeDutta Is the target application Azure AD?


Regards,
Sahil

rushikeshvartak
All-Star
All-Star

username is mandatory which is missing in call1 "colsToPropsMap"


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.