邮递员和GraphAPI/me/onlineMeetings错误403 [英] postman and GraphAPI /me/onlineMeetings error 403

查看:130
本文介绍了邮递员和GraphAPI/me/onlineMeetings错误403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用PostMan测试API > ://docs.microsoft.com/zh-CN/graph/api/application-post-onlinemeetings?view = graph-rest-1.0& tabs = http

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

但始终返回403 ...

But always return 403...

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

我按照这篇文章来设置邮递员微软文章,除了这个API以外,其他所有工具都运作良好,而且我不明白为什么

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

推荐答案

对于此问题,是由于该应用没有创建在线会议的权限所致.当您单击邮递员中的获取用户访问令牌"时,它将获得访问令牌,其中包括您之前添加到应用程序的权限.如果要测试创建在线会议api,则需要转到azure门户并为其添加适当的权限.请参考以下步骤:

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..转到azure门户,然后单击"Azure Active Directory"->应用程序注册"->所有应用程序".通过在邮递员中为图形环境设置的ClientID搜索应用程序.

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..在注册应用程序中,单击"API权限"并为其添加OnlineMeetings.ReadWrite权限.

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

添加OnlineMeetings.ReadWrite权限后,不要忘记为此授予管理员权限.

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

3..现在您需要在邮递员中再次获取用户访问令牌,请单击邮递员中的获取用户访问令牌".您可以通过将访问令牌复制到此页面来检查权限,它将解析访问令牌,您可以检查是否令牌包含OnlineMeetings.ReadWrite权限.(由于添加访问令牌的权限需要几分钟,因此您最好解析访问令牌以检查其是否包含该权限)

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)

4..然后,您可以在邮递员中测试此api(下面我提供了一个创建在线会议示例供您参考).

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

这篇关于邮递员和GraphAPI/me/onlineMeetings错误403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆