Can anyone please help me with how we can make ajax call the method to add Owner to O365 group. I am using below mentioned end-point: https://graph.microsoft.com/v1.0/groups/{id}/owners/$ref
This is how my ajax call is looking like as i'm thinking the user information will be pass through data property. Just want to know if this is the right way to work with this API
$.ajax({
method: 'POST',
url: "https://graph.microsoft.com/v1.0/groups/"+ OGroupID +"/owners/$ref", //pass Office 365 Group Id
headers: {
'Authorization': 'Bearer ' + token,
'Content-Type': 'application/json'
},
data:{
"@odata.id": "https://graph.microsoft.com/v1.0/users/" +delegateOwner
},
}).success(function(response) {
console.log(response.value);
var data = response.value;
}).error(function(error) {});
I think this feature for passing @Odataid using Ajax call is currently not available , if you want this feature to be there , you can raise a feature request - https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform .