Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Microsoft graph API for PIM users

Ekata
New Contributor III
New Contributor III

Hi Team,

Can you help in getting the Microsoft graph API for Azure PIM eligible member to remove the members from the entitlements. 

We have a requirement to remove normal accounts as well as the eligible members from the Azure AD groups.

Kindly suggest.

Regards,

Ekata

6 REPLIES 6

rushikeshvartak
All-Star
All-Star

Refer https://learn.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0&tabs=http


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi Rushikesh,

Thanks for the response but this API we already tried but getting error while completing the task.

Error message- {"AADGroup":{"headers":null,"message":{"error":{"code":"Request_ResourceNotFound","message":"Resource '00d9a4d0-5128-45ff-af88-a8c71f3680c2' does not exist or one of its queried reference-property objects are not present.","innerError":{"date":"2023-11-23T12:21:19","request-id":"5272b563-2170-4fa4-8cbf-8d598e7681df","client-request-id":"5272b563-2170-4fa4-8cbf-8d598e7681df"}}},"statusCode":404,"description":null,"status":"Failed"}}

Ekata
New Contributor III
New Contributor III

Below is the API we use:

{
"call": [

{
"name": "AADGroup",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/groups/${entitlementValue.entitlementID}/members/${account.accountI...\$ref",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
}
}
]
}

and it is working for Normal accounts. 

  • Does it working from postman?
  • Does service account have required privileges 

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

1. For normal accounts yes but for the privileged members no.

2.  It has the required privileges. The error is regarding the resourceID not found. For permissions issue it should throw error as authorization error. right?

Ekata
New Contributor III
New Contributor III

The prob I guess here is the API only which either I am unable to map correctly or the API itself is not the correct one.