vrund297
vrund297

Reputation: 29

microsoft Graph API for creating online meeting giving error "UnknownError" response 404

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

Upvotes: 0

Views: 981

Answers (1)

Allen Wu
Allen Wu

Reputation: 16458

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

Upvotes: 1

Related Questions