Microsoft Graph API beta OnlineMeetings Error - Server error: User lookup by user id failed in AAD

雨燕双飞 提交于 2021-02-11 15:20:57

问题


I am working on a slack app that calls Microsoft Graph API in order to generate a Microsoft Teams meeting link.

I am able to generate an access token, however I am getting the error:

{
    "error": {
        "code": "InternalServerError",
        "message": "Status: NotFound (404)\r\nOperationId: 53deefa0-754d-451d-8d0b-34c94ecf1c8e\r\nClientCorrelationId: 4794ce56-5774-40c5-a272-b6e4cb1242ab\r\nServer error: User lookup by user id failed in AAD.\r\nClient exception: Processing of the HTTP request resulted in an exception. Please see the HTTP response returned by the 'Response' property of this exception for details.\r\n",
    }
}

Because I use an application token, I am using the beta version of microsoft graph API

Here is my post request:

POST https://graph.microsoft.com/beta/users/{Application Object ID}/onlineMeetings

{
    "startDateTime": "2020-12-28T14:30:34.2444915-07:00",
    "endDateTime" :  "2020-12-29T15:00:34.2464912-07:00",
    "subject" : "User Token Meeting",
    "participants": {
        "organizer": {
            "identity": {
                "user": {
                    "id": "Application client ID"
                }
            }
        }
    }
}

The Microsoft docs unfortunately don't show an example for my use case, so I would really appreciate if someone could help me out.

Docs: https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-beta&tabs=http


回答1:


What @allen said is right, you should not put the Application Object ID in the request url, you need to put the user id.

You can also view the document:



来源:https://stackoverflow.com/questions/65434507/microsoft-graph-api-beta-onlinemeetings-error-server-error-user-lookup-by-use

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!