I am trying to create Online Meeting using Microsoft graph API with reference to this document. I am getting a response of 404 from the request.
My API: https://graph.microsoft.com/v1.0/users/vrund@microsoft.com/onlineMeetings/
This is my request in python which giving this error.
self.headers = {
"Content-Type": "application/json",
'Authorization': 'Bearer {}'.format(self.token)
}
response = requests.request("POST", url=API, data=body_json, headers=self.headers)
<Response [404]>
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2021-04-20T10:19:06",
"request-id": "a82b1c87-7d3c-4006-8605-4f285068fb57",
"client-request-id": "a82b1c87-7d3c-4006-8605-4f285068fb57"
}
}
}
POST /users/{userId}/onlineMeetings
userId
is the object ID of a user. You can't use the userPrincipalName
here.
See reference here.
Please note that if you are using Application token (Application permission), don't forget to create an application access policy.
If userPrincipalName
is supported in an endpoint, the document generally states it like this: