代码之家  ›  专栏  ›  技术社区  ›  Unii

MSAL库返回403

  •  1
  • Unii  · 技术社区  · 7 年前

    在上配置我的应用程序后 apps.dev.microsoft.com 我可以使用管理员帐户登录MSAL的移动应用程序。其他用户获得 403 -Forbidden 从Microsoft Graph请求数据时。

    应该为用户重新配置什么以授予访问权限?

    应用程序注册范围:

    User.ReadWrite
    User.ReadBasic.All
    Calendars.ReadWrite
    Contacts.Read
    

    Android应用程序中的范围:

    https://graph.microsoft.com/User.ReadWrite
    https://graph.microsoft.com/User.ReadBasic.All
    https://graph.microsoft.com/Calendars.ReadWrite
    https://graph.microsoft.com/Contacts.Read
    

    应用程序发出的请求:

    https://graph.microsoft.com/v1.0/users
    https://graph.microsoft.com/v1.0/me/events
    https://graph.microsoft.com/v1.0/users/{user}/calendarview
    https://graph.microsoft.com/v1.0/me/events/{identifier}
    
    1 回复  |  直到 7 年前
        1
  •  1
  •   Unii    7 年前

    我想app dev网页有问题,或者数据没有传播。我删除了门户和应用程序中的所有委派权限,并使用文档添加了我请求的所有权限,即使文档中提到我只能从中选择1个。它对第一个请求有效 /users 所以我又提出了一个要求。在检查应用程序中的所有请求是否有效后,我开始删除“其他”权限。它仅以3个权限结束:

    "https://graph.microsoft.com/User.ReadWrite",
    "https://graph.microsoft.com/User.ReadBasic.All",
    "https://graph.microsoft.com/Calendars.Read"