Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/23/2023 02:03 AM
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
]
}
}
]
}
Solved! Go to Solution.
10/23/2023 02:22 AM - edited 10/23/2023 02:23 AM
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.
10/23/2023 02:26 AM
Greetings Sudesh,
The above JSON worked. Thank you for the swift reply.