【问题标题】:SharePoint Online UserInfo endpoint URLSharePoint Online UserInfo 端点 URL
【发布时间】:2018-05-09 03:49:51
【问题描述】:

我正在尝试使用 Microsoft.SharePointOnline.CSOM 版本 16.1.7018.1200 构建 SharePoint Online 适配器

我正在努力为这个 REST API 寻找正确的端点 URL。其中一些可能与 GDrive 中的相同(因为它们都使用 OAuth2),但我仍然有点困惑。我的问题是: - 范围、LoginBaseUrl、AccessTokenBaseUrl 和 UserInfoEndpointUrl

以 GDrive 为例:

Scope = "https://www.googleapis.com/auth/drive.file";

LoginBaseUrl = "https://accounts.google.com/o/oauth2/auth";
AdditionalLoginParameters.Add("response_type", "code");

AccessTokenBaseUrl = "https://accounts.google.com/o/oauth2/token";
AdditionalAccessTokenParameters.Add("grant_type", "authorization_code");

UserInfoEndpointUrl = "https://www.googleapis.com/drive/v3/about?fields=user&access_token=" + accessToken;

PS:如果有人有一些文档或代码示例,将不胜感激!到目前为止,我只能找到用于读取操作的代码示例。

如果需要任何其他信息,请告诉我。

最好的问候, SVG

【问题讨论】:

    标签: sharepoint-online sharepoint-2016 sharepoint-object-model


    【解决方案1】:

    如果您从身份验证的角度谈论用户信息端点,Azure Active Directory 实际上正在处理 SharePoint Online 的大部分身份验证和一些授权。目前的情况有点复杂:

    • AAD v1 端点(用于希望通过 Microsoft Graph 与更广泛的 Office 365 堆栈通信的应用程序)
    • AADv2 端点(用于也希望与消费者工作负载通信的应用程序)
    • SharePoint 的应用程序授权服务(用于只能与 SharePoint 而不能与 Office 365 堆栈中的其他服务通信的应用程序)

    但是 v2 配置端点将提供 user_info 端点documentation

    如果您想阅读 SharePoint 用户配置文件,请参阅the documentation REST API,CSOM 为您提供了更多功能。

    但是,如果您没有专门从 SharePoint 读取的需求映射,我建议改为使用 Graph 用户端点Documentation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-05
      • 1970-01-01
      • 2020-11-25
      • 2015-10-09
      • 1970-01-01
      • 2019-10-03
      • 1970-01-01
      • 2020-10-16
      相关资源
      最近更新 更多