oidmismatch in token and url for Create Online Meeting

Alexander Moreno 96 Reputation points
2021-04-02T21:44:50.97+00:00

Hi,

I am currently trying to create Online Meetings through the Microsoft Graph API.

Currently, I have created an App, and have given it scope permissions to give me a list of users, and create Online Meetings.

Scope Permissions:
84099-image.png

At the moment, I am using an AD Account to Grant access to my App, and GET a list of users within the org.

When i use MY Microsoft Account ID, i am able to successfully create a meeting, and invite users through Teams. However, When I replace the userID on the URL:
* https://graph.microsoft.com/v1.0/users/\<Microsoft User ID goes here>/onlineMeetings

When I replace the given User ID with a different user, it gives me an error of:

{  
  "error": {  
    "code": "BadRequest",  
    "message": "oid mismatch in token and url (token=TokenErrorCode url=<Microsoft AD Account User>). Current support is only for /me endpoint.",  
    "innerError": {  
      "date": "2021-04-02T21:09:35",  
      "request-id": "96e2d559-095b-4b31-9b9b-b1c7b0198e38",  
      "client-request-id": "96e2d559-095b-4b31-9b9b-b1c7b0198e38"  
    }  
  }  
}  

I thought the scope permissions I had, was suppose to give access to everyone in the Org. Is there a setting I have wrong in the OAuth flow. Or is there a setting I need turned on?

Thanks

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,505 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,822 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deva-MSFT 2,256 Reputation points Microsoft Employee
    2021-04-05T15:53:14.637+00:00

    I think the above error is pretty clear. I see that when you try delegated permissions it works, but when try to perform the call on behalf of others then it doesn't support or throws the error. But you never mentioned when you tried making application permission call whether the token contains the necessary scopes/permissions or not. In addition to that you need to check the documentation - refer important section as it talks about Administrators must create an application access policy and grant it to a user, authorizing the app configured in the policy to create an online meeting on behalf of that user (user ID specified in the request path).

    0 comments No comments