如何将 Azure AD (Active Directory) B2C 与现有的 Azure AppService 集成?
How to integrate Azure AD (Active Directory) B2C with an existing Azure AppService?
我有一个现有的 Azure 应用服务 mywebsite.azurewebsites.net
。此 应用程序服务 没有任何身份验证。我现在正在 Visual Studio 2017 15.3(发布于 2017 年 8 月 14 日)中创建一个新的网络应用程序,以将我当前的 ASP.NET Core 1.1 MVC 应用程序升级到 ASP.NET Core 2.0,并集成使用 Azure AD B2C。
我在将当前的 app 服务 mywebsite.azurewebsites.net
与 Azure AD B2C 集成时遇到了一些问题。
我按照 Creating a Azure AD B2C 步骤创建了 AD B2C。然后我观察到这个资源在域 onmicrosoft.com
下。在我个人资料下的 DIRECTORY link 下,我可以看到域 something.onmicrosoft.com
.
现在,当我去注册一个应用程序时,我必须提供 onmicrosoft.com
下存在的网页,而我没有。我拥有的所有网页都在域 mywebsite.azurewebsites.net
.
下
如何让应用程序服务和 DIRECTORY 资源存在于同一域 mywebsite.azurewebsites.net
或 mywebsite.onmicrosoft.com
下?如果需要,我可以创建新的资源组、资源等。
在 VS 2015 中与 AD B2C 集成:
Azure 设置:
Azure 目录:
使用 AD B2C 注册应用程序:
Azure AD B2C 有一个 .NET Core 2.0 示例 here (it's in the core2.0 branch). It may help to run through the sample once, but the general idea is that the App ID URI has nothing to do with your resource's actual location (*.azurewebsites.net). When you create an app registration for your API, you need to simply provide an identifier for Azure AD B2C so that Azure AD B2C knows which app registration you are referring to when you specify scopes. Scopes are necessary when you are trying to acquire an access token。
我有一个现有的 Azure 应用服务 mywebsite.azurewebsites.net
。此 应用程序服务 没有任何身份验证。我现在正在 Visual Studio 2017 15.3(发布于 2017 年 8 月 14 日)中创建一个新的网络应用程序,以将我当前的 ASP.NET Core 1.1 MVC 应用程序升级到 ASP.NET Core 2.0,并集成使用 Azure AD B2C。
我在将当前的 app 服务 mywebsite.azurewebsites.net
与 Azure AD B2C 集成时遇到了一些问题。
我按照 Creating a Azure AD B2C 步骤创建了 AD B2C。然后我观察到这个资源在域
onmicrosoft.com
下。在我个人资料下的 DIRECTORY link 下,我可以看到域something.onmicrosoft.com
.现在,当我去注册一个应用程序时,我必须提供
onmicrosoft.com
下存在的网页,而我没有。我拥有的所有网页都在域mywebsite.azurewebsites.net
. 下
如何让应用程序服务和 DIRECTORY 资源存在于同一域 mywebsite.azurewebsites.net
或 mywebsite.onmicrosoft.com
下?如果需要,我可以创建新的资源组、资源等。
在 VS 2015 中与 AD B2C 集成:
Azure 设置:
Azure 目录:
使用 AD B2C 注册应用程序:
Azure AD B2C 有一个 .NET Core 2.0 示例 here (it's in the core2.0 branch). It may help to run through the sample once, but the general idea is that the App ID URI has nothing to do with your resource's actual location (*.azurewebsites.net). When you create an app registration for your API, you need to simply provide an identifier for Azure AD B2C so that Azure AD B2C knows which app registration you are referring to when you specify scopes. Scopes are necessary when you are trying to acquire an access token。