【问题标题】:what is the redirect url to be used for OneDrive for business code flow?用于 OneDrive for business 代码流的重定向 url 是什么?
【发布时间】:2021-07-21 03:06:23
【问题描述】:

我们有developed a windows application to upload/download file on a OneDrive account using LiveSDK

作为new requirement now we need to support OneDrive for Business also.

LiveSDK 访问令牌的 URL: https://login.live.com/oauth20_authorize.srf?client_id={client_id}&scope=wl.signin%20wl.offline_access%20onedrive.readwrite&response_type=token&redirect_uri=https://login.live.com/oauth20_desktop.srf

在切换到使用 OneDrive for Business 的代码流时,我们正在使用

https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id={client_id}&redirect_uri=https://login.live.com/oauth20_desktop.srf

任何人都可以帮助redirect_uri在这里使用吗? 应用程序已在 azure 门户中注册。按照此 MS 博客文章中的步骤进行操作

[https://docs.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/aad-oauth?view=odsp-graph-online#register-your-app-with-天蓝色活动目录]

【问题讨论】:

    标签: azure oauth-2.0 onedrive


    【解决方案1】:

    我觉得你说的应该是 Azure AD 的auth code flow。您的redirect_uri 似乎没有问题,您只需将其添加到应用程序中即可。

    【讨论】:

      【解决方案2】:

      这是我正在使用的。

      URI_PERSONAL_ACCOUNT        = "https://login.live.com/oauth20_desktop.srf"
      
      URI_BUSINESS_ACCOUNT    = "https://login.microsoftonline.com/common/oauth2/v2.0/"
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-08-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-10-21
        • 2015-04-25
        相关资源
        最近更新 更多