【问题标题】:Office 365 managed activity api authorisationOffice 365 托管活动 API 授权
【发布时间】:2016-11-18 10:54:09
【问题描述】:
【问题讨论】:
标签:
office365
office365api
office365-apps
【解决方案1】:
您是如何获得访问令牌的?如果我使用其他资源(Office 365 或 Microsoft Graph 等)的令牌调用 Office 365 管理 REST API,我只能重现此问题
您可以参考下面的请求来获取 Office 365 管理 REST API(授权码授予流程)的令牌。
第一步:获取授权码
Get: https://login.windows.net/common/oauth2/authorize?response_type=code&resource=https%3A%2F%2Fmanage.office.com&client_id={clientId}&redirect_uri={RedirectUrl}
第 2 步:请求访问令牌
POST: https://login.windows.net/common/oauth2/token
resource=https%3A%2F%2Fmanage.office.com&client_id={clientId}&redirect_uri={redirectUrl}&client_secret={clientSecret(if it is a confident app)}&grant_type=authorization_code&code={AuthCode}
更多获取token的进度,可以参考here