I'm using Azure Graph API with Azure AD B2C and I'm trying to add a Group as a member of a Group
I have successfully preformed a range of other calls against Azure Graph API including adding a User as a Member of a Group.
This is the call I'm making URL:
POST https://graph.windows.net/{tenant}/groups/{groupId}/$links/members?api-version=1.6
Body:
{
"url": "https://graph.windows.net/{tenant}/directoryObjects/{groupToAdd}"
}
I get the following error:
{
"odata.error": {
"code": "Request_BadRequest",
"message": {
"lang": "en",
"value": "An invalid operation was included in the following modified references: 'members'."
},
"requestId": "2545d9bf-68c9-44bf-a9ba-1a2976e0c055",
"date": "2019-09-11T03:11:37"
}
}
The exact same call worked when using a User's ObjectId but using a Groups throws the error.
Maybe related, the "Group Memberships" is missing in Azure when viewing a Group
Update: When I first posted this question I was missing an important piece of information. This is Graph API calls against Azure Active Directory B2C