请告诉我在使用OneDrive REST API时应该使用的身份验证方法是什么 . 使用URL https://login.windows.net/common/oauth2/authorize是AZURE AD吗?还是https://login.live.com/oauth20_authorize.srf?
我正在尝试简单地调用新的OneDrive REST API(我正在使用Azure AD,但不确定这是否是正确的身份验证方法) . 我正在使用Postman rest客户端发送请求 . 我已在Azure AD中注册了我的应用程序,并赋予其对“Office 365 SharePoint Online”的完全权限 . 我可以使用Azure AD中生成的clientId成功获取授权令牌 . 但是,当我尝试使用访问令牌使用以下请求列出文件时,我收到以下错误 . 能告诉我可能是什么问题吗?
RESOURCE HTTP GET:
网址:https://-my.sharepoint.com/personal//_api/Files Headers :授权:持票人
响应:
3001000; reason =“验证请求时出错 . ”; category =“invalid_client”
2 回答
如果您推荐OneDrive的公共免费版本,那么您应该看一下OneDrives API Documentation . 其中使用Live SDK .
如果您使用的是OneDrive for Business,那么您应该use the SharePoint 2013 APIs . 对于SharePoint在线this Question (its answer) on SharePoint StackExchange可能会有所帮助 . 或者,如果您寻找新的预览版Office365,您可能会发现this page很有趣 .
A blog post with full walkthrough and code how to authenticate to SharePoint Online with Azure ACS .
查看描述OneDrive Business和其他O365服务API的[new] [1] v1.0 O365 API,包括身份验证 .