We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Not able to update manager in Azure

varunpuri
Regular Contributor
Regular Contributor

Hi,

I am trying to update the manager of a user in Azure. I am using the API as explained here - https://learn.microsoft.com/en-us/graph/api/user-post-manager?view=graph-rest-1.0&tabs=http

The JSON construct is :

{
"name": "call3",
"callOrder": 2,
"connection": "userAuthForB2C",
"url": "${'https://graph.microsoft.com/v1.0/users/'+response.call1.message.id+'/$ref'}",
"httpMethod": "PUT",
"httpParams": "{\"@odata.id\":\"https://graph.microsoft.com/v1.0/users/${response.call2.message.id}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
}
}

call1 and call2 have been successfully configured and are working. However, when the above JSON runs, then Saviynt throws the following exception :

"2023-12-21T14:07:26.336+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-5-fc6c5","ERROR","Call response: {"error":{"code":"BadRequest","message":"Unsupported segment type. ODataQuery: /users/1b66139d-4c4b-49cb-98e9-c03da73bd70b/$ref","innerError":{"date":"2023-12-21T14:07:26","request-id":"f1ea0c43-e40b-4d01-a486-ffe816670","client-request-id":"f1ea0c43-e40b-4d01-a486-ffe816670"}}}"
"2023-12-21T14:07:26.336+00:00","ecm-worker","rest.RestProvisioningService","

Appreciate your help here.

Best Regards,
Varun

1 REPLY 1

rushikeshvartak
All-Star
All-Star

url should be. https://graph.microsoft.com/v1.0/users/${response.call1.message.id}/manager/\\$ref


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