SPFx webpart in MSTeams Desktop Client throws an UnauthorizedAccessException

﹥>﹥吖頭↗ 提交于 2020-02-02 13:06:10

问题


This question is very similar to a question which has been asked previously on StackOverflow. However, the error I'm getting is different.

AadHttpClient fails when loading SP page with SPFx webpart in MSTeams Desktop Client

I also have a Sharepoint Online site in which I have an SPfx web part which makes use of AadHttpClient. This webpart works if I navigate to the Sharepoint site from a browser or open MS Teams web client.

My setup is as follows:

  • I have a team in MS Teams
  • I added a new tab in Teams and selected Sharepoint from available apps
  • I selected an existing Sharepoint site to be displayed

When I debugged the MS Teams desktop client, I have this call in in the Network requests tab:

{"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have permission to perform this action or access this resource."}}}

I wonder why this only happens in MS Teams desktop client and not on either the web client on Sharepoint Online.

来源:https://stackoverflow.com/questions/59860729/spfx-webpart-in-msteams-desktop-client-throws-an-unauthorizedaccessexception

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