简体   繁体   English

SharePoint Online获取身份验证令牌,而无需重定向到URL

[英]SharePoint Online Get Authentication token without redirecting to URL

I have a ChatBot using Microsoft Bot Framework which is hosted on azure which gets data from a SharePoint list and displays the same. 我有一个使用Microsoft Bot Framework的ChatBot,它托管在azure上,后者从SharePoint列表中获取数据并显示相同内容。 This chatbot is used in SharePoint page. 此聊天机器人用于SharePoint页面。

When used first types in message, bot responds with address of URL clicking on which returns the access token which can be used to authenticate with SharePoint. 当在消息中使用第一种类型时,bot会通过单击URL的地址进行响应,然后单击该URL返回可用于向SharePoint进行身份验证的访问令牌。 Format of URL is as below: URL格式如下:

{spAuth_SiteUri}/_layouts/15/appredirect.aspx?client_id={spAuth_AppClientId}&redirect_uri={spAuth_RedirectUri}

Is there any way we can bypass this redirection and get token from back end? 有什么方法可以绕过此重定向并从后端获取令牌? Method which is used is below: 使用的方法如下:

GetClientContextWithContextToken

SharePoint Add-ins are authenticated against the SharePoint host. 针对SharePoint主机对SharePoint加载项进行身份验证。 You could create an add-in which itself hosts the webchat client. 您可以创建一个外接程序,该外接程序本身托管网络聊天客户端。 You can/could tweak web-chat to do additional stuff with SharePoint as needed from there. 您可以/可以根据需要调整Web聊天以使用SharePoint进行其他操作。 This would be opposed to the simple webchat in an iframe/webpart setup (which won't let you do what you need). 这与iframe / webpart设置中的简单网络聊天相反(后者无法让您做所需的事情)。

Please see the following links for more information. 请查看以下链接以获取更多信息。

SharePoint Add-ins SharePoint加载项

WebChat 网上聊天

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无需注册为应用即可获取 SharePoint 在线用户访问令牌 - Get SharePoint online user access token without registering as app Oauth 2.0无需访问即可将访问令牌重定向到其他页面 - Oauth 2.0 get access token without redirecting the user to different page 如何在重定向用户后获取经过身份验证的令牌 - How to get authenticated token after redirecting user 如何在基于令牌的身份验证中重定向到返回URL - How to redirect to the return URL in token based authentication 使用openid connect而不重定向到安全令牌服务 - use openid connect without redirecting to security token service 尝试使用CSOM和令牌将文档上载到SharePoint Online时,为什么会遇到401? - Why do I encounter a 401 when attempting to upload a document to SharePoint Online using CSOM and a token? 如何从 URL 获取令牌? - how to Get token from URL? 是否可以使用 id_token 在没有身份验证的情况下请求访问令牌? - Is it possible to use id_token to request access token without authentication? Flask通过Sharepoint Online进行身份验证 - Flask authenticate with Sharepoint Online 将用户重定向到oauth2授权服务器以获取令牌Spring Boot - Redirecting user to oauth2 authorization server to get token Spring Boot
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM