0
votes

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/[email protected]/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"
    }
  }
}

error screenshot

1
Are you using App context or User context flow? How are you getting the token?Shiva Keshav Varma

1 Answers

0
votes
POST /users/{userId}/onlineMeetings

userId is the object ID of a user. You can't use the userPrincipalName here.

See reference here.

enter image description 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:

enter image description here