配置标识提供程序Configuring identity providers

将应用程序配置为使用 Azure Active Directory 作为标识提供程序Configuring an application to use Azure Active Directory as an identity provider

支持 OAuth 2.0 的标识提供程序将不会对来自未知应用程序的请求进行身份验证;必须提前注册应用程序。Identity providers supporting OAuth 2.0 will not authenticate requests from unknown applications; applications must be registered ahead of time. 若要在 Azure AD 中执行此操作,请按照以下步骤操作:To do this with Azure AD, follow these steps:

  1. 打开 "应用程序注册门户"。Open the Application Registration Portal.

  2. 选择您的应用程序以查看其属性,或单击 "新建注册" 按钮。Select your app to view its properties, or click the "New Registration" button. 查找应用程序的 "重定向 URI " 部分。Find the Redirect URI section for the app.

  3. 在下拉菜单中,确保选择 " Web "。In the dropdown menu, make sure Web is selected. 更新身份验证终结点的 URL。Update the URL to your authentication endpoint. 对于 GitHub 上的 TypeScript/node.js 和 c # 示例应用程序,重定向 Url 将类似于以下内容:For the TypeScript/Node.js and C# sample apps on GitHub, the redirect URLs will be similar to this:

    重定向 Url:https://<hostname>/bot-auth/simple-startRedirect URLs: https://<hostname>/bot-auth/simple-start

<hostname>替换为实际主机。Replace <hostname> with your actual host. 这可能是一个专用的承载网站,如 Azure、问题或与开发计算机上的 localhost (如) abcd1234.ngrok.io的 ngrok 隧道。This might be a dedicated hosting site such as Azure, Glitch, or an ngrok tunnel to localhost on your development machine such as abcd1234.ngrok.io. 如果尚未完成或托管您的应用程序(或上面提到的示例应用程序),则可能还没有这些信息,但在已知该信息时,您始终可以返回此页面。You may not have this information yet if you have not completed or hosted your app (or the sample app mentioned above), but you can always return to this page when that information is known.

其他身份验证提供程序Other authentication providers