AD Distrubution Group Add/ REmove JSON
{
"call": [
{
"name": "DirectoryRole",
"connection": "userAuth",
"url": "https://graph.microsoft.com/v1.0/directoryRoles/${entitlementValue.entitlementID}/members/${account.accountID}/\\$ref",
"httpMethod": "DELETE",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
}
},
{
"name": "AADGroup",
"connection": "${entitlementValue.customproperty11 != null && entitlementValue.customproperty11.contains('DynamicMembership') ? '' : (entitlementValue.customproperty8.trim().equals('true') && entitlementValue.customproperty10.trim().equals('false') ? 'acctAuth' : 'userAuth')}",
"url": "${entitlementValue.customproperty8.trim().equals('true') && entitlementValue.customproperty10.trim().equals('false')? 'http://PDC-SRV-JMPEXT8.masgrp.corp.pri/SaviyntAgent/PS/ExecutePSScript':'https://graph.microsoft.com/v1.0/groups/'+entitlementValue.entitlementID+'/members/'+account.accountID+'/\\$ref'}",
"httpMethod": "${entitlementValue.customproperty8.trim().equals('true') && entitlementValue.customproperty10.trim().equals('false')? 'POST' : 'DELETE'}",
"httpParams": "${entitlementValue.customproperty8.trim().equals('true') && entitlementValue.customproperty10.trim().equals('false')?'{\"Script\":\"Powershell.exe -File c:/MASScripts/DistributionGroupsRemove.ps1 '+account.accountID+' '+entitlementValue.customproperty7+'\"}' : '{\"@odata.id\":\"https://graph.microsoft.com/v1.0/directoryObjects/'+account.accountID+'\"}'}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "${entitlementValue.customproperty8.trim().equals('true') && entitlementValue.customproperty10.trim().equals('false')?'application/x-www-form-urlencoded' : 'application/json'}",
"successResponses": {
"statusCode": [
200,
201,
204,
205
]
},
"unsuccessResponses": {
"odata~dot#error.code": [
"Request_BadRequest",
"Authentication_MissingOrMalformed",
"Request_ResourceNotFound",
"Authorization_RequestDenied",
"Authentication_Unauthorized"
]
}
}
]
}
---
Comments
Post a Comment