Sharepoint 身份验证Office 365中不支持的仅应用程序令牌问题
我已通过此链接访问了 在Office365中将守护程序或服务器应用程序设置为Web API身份验证方法,以获取访问令牌 下面给出了访问令牌请求的示例Sharepoint 身份验证Office 365中不支持的仅应用程序令牌问题,sharepoint,office365,office365-apps,office365api,Sharepoint,Office365,Office365 Apps,Office365api,我已通过此链接访问了 在Office365中将守护程序或服务器应用程序设置为Web API身份验证方法,以获取访问令牌 下面给出了访问令牌请求的示例 POST https://login.microsoftonline.com/{tenant-id}/oauth2/token grant_type : client_credentials client_id : {clientId} client_secret : {clientSecret} resource : https://{tenan
POST https://login.microsoftonline.com/{tenant-id}/oauth2/token
grant_type : client_credentials
client_id : {clientId}
client_secret : {clientSecret}
resource : https://{tenant}.sharepoint.com
例如:
https://login.microsoftonline.com/cae788bd-7a55-4fb5-9d1f-3aa5365e14a/oauth2/token
grant_type : client_credentials
client_id : 1dd0a211-06f1-4f6a-a232-b3a8dcab829b
client_secret : ZWtkWm9M5Ucx5j29UoXPy7GKG+Hu0eNdVFYO+lH761w=
resource : https://{tenant}.sharepoint.com
从上面的api请求中,我得到了一个访问令牌,当我试图创建文件夹或从上面的访问令牌访问任何其他api时,它就是
将错误显示为“不支持的仅应用程序令牌”。我已尝试调用此webservices以获取此错误:
PUT https://{tenant}.sharepoint.com/_api/v1.0/Files/{parent-id}/children/{folder-name}
Authorization : BearerBearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1uQ19WWmNBVGZNNXBPWWlKSE
Content-Type : application/json
Accept : application/json
但之前我们在Office365中使用了相同的守护程序或服务器应用程序到Web API身份验证方法来获取访问令牌,并且工作正常
我们已经使用accesstoken访问office 365 API,但现在它显示错误为“不支持的应用程序专用令牌”。Manoj
我的应用程序只在邮件API的WPF应用程序中工作,您是否设置了证书?
根据你提到的博客
由于这类应用享有广泛的访问权限,因此该应用还需要成功获取访问令牌。应用程序必须使用带有公钥/私钥对的X.509证书,而不是使用客户端ID和客户端密码
请参阅此链接如何设置它:
你有没有想过这一点?你的解决方案是什么?