0
votes

I need to test with PostMan the API https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http

But always return 403...

{
  "error": {
    "code": "Forbidden",
    "message": "",
    "innerError": {
      "request-id": "76cf26ec-0be3-4b51-a8a8-5c70d71e426c",
      "date": "2020-05-25T15:38:50"
    }
  }
}

I have follow this articole to setup postman microsoft article and all work very well, except this API, and I don't understand why

1

1 Answers

2
votes

For this problem, it was caused by the app doesn't have permission to create online meeting. When you click the "Get User Access token" in your postman, it will get the access token which includes the permissions you added to the app before. If you want to test the create online meeting api, you need to go to azure portal and add appropriate permissions for it. Please refer to the steps below:

1. Go to azure portal and click "Azure Active Directory" --> "App registrations" --> "All applications". Search the app by the ClientID which you set in your postman for the graph environment.

2. In you registration app, click "API permissions" and add the OnlineMeetings.ReadWrite permission for it. enter image description here

enter image description here

After add the OnlineMeetings.ReadWrite permission, don't forget grant admin consent for it. enter image description here

3. Now you need to get the user access token again in your postman, please click "Get User Access Token" in your postman. You can check the permissions by copy the access token to this page, it will parse the access token and you can check if the token contains the OnlineMeetings.ReadWrite permission.(As add the permission to access token requires a few minutes, so you'd better parse the access token to check if it contains the permission)

enter image description here

4. Then you can test this api in your postman (below I provide a create online meeting sample for your reference). enter image description here