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

AddAccessJSON - REST connection.

avinash_16
New Contributor III
New Contributor III

Greetings,

Our requirement is to provision an account in Azure Active Directory and assign him to a group where the group is already linked to a O365 license so that when a user is added to that group, automatically the license is assigned to that user. We were able to create an account but when it comes to adding the user to the group, we are facing some JSON syntaxing issues. As suggested by the Documentation for our import connection, we're using the Azure AD connector and using REST (using graph api functionality to do all API calls) for provisioning. I'll add the AddAccessJson parameter. Any help on this would be highly appreciated.

{
"call": [
{
"name": "AADGroup",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/groups/${entitlementValue.entitlementID}/members/$ref",
"httpMethod": "POST",
"httpParams": "{@odata.id: https://graph.microsoft.com/v1.0/directoryObjects/${account.accountid}}",
"httpHeaders": {
"Authorization": "${access_token}",
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204
]
}
}
]
}

2 REPLIES 2

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @avinash_16,

Please try with the below json and let me know if it works.

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


Thanks.

If you find the above response useful, Kindly Mark it as "Accept As Solution".

Greetings Sudesh,
The above JSON worked. Thank you for the swift reply.