使用oAuth在SharePoint Online中检索用户访问令牌 [英] Retrieve User Access Token in SharePoint Online using oAuth

查看:98
本文介绍了使用oAuth在SharePoint Online中检索用户访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我们正在尝试检索Sharepoint Online的用户访问令牌。我们可以根据以下步骤检索用户令牌:



1)检索领域

2)检索代码通过传递客户端ID重定向页面以授权URL来登录用户。

3)从上一步获得的代码中检索访问令牌。





尝试检索访问代码时,我们需要回发页面以授权URL。在这里它还会提示用户信任该应用程序。



1)有没有办法我们可以跳过Post回授权URL? 



2)有没有办法跳过提示?

解决方案


请检查SharePoint加载项的授权代码OAuth流程。


https://msdn.microsoft.com/en-us/library/office/jj687470.aspx?f=255&MSPPError=-2147217396


感谢




We are trying to retrieve the user access token for Sharepoint Online. We are able to retrieve the user Token based on the following steps,

1) Retrieve the Realm
2) Retrieve the Code for the Logged in user by redirecting the Page to authorize URL by passing the Client ID.
3) Retrieve the Access Token from the code obtained from the previous step.


When trying to retrieve the access code, we need to postback the page to authorize URL. Here it also prompts the user to Trust the App.

1) Is there any way that we could skip the Post back to Authorize URL? 
or
2) Is there any way to skip the prompt?

解决方案

Hi,

Please check the authorization code OAuth flow for SharePoint Add-ins.

https://msdn.microsoft.com/en-us/library/office/jj687470.aspx?f=255&MSPPError=-2147217396

Thanks


这篇关于使用oAuth在SharePoint Online中检索用户访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆