I have managed to connect to the Graph API and I'm able to pull data without any issues. I now want to add a user to a group and I cannot for the life of me get it to work. The MS documentation says its POST https://graph.microsoft.com/v1.0/groups/{id}/members/$ref. I believe $ref
is the reference to the user in the format below. How, in Powershell, do I submit this using Invoke-RestMethod
?
{
"@odata.id": "https://graph.microsoft.com/v1.0/users/a0fbxxxb7-2b3d-4df1-a0ce-3bfdb513dxxx"
}