Reputation: 11599
I have an existing Azure App Service mywebsite.azurewebsites.net
. This app service does not have any authentication. I am now creating a new web app in Visual Studio 2017 15.3 (Released on 8/14/2017) to upgrade my current ASP.NET Core 1.1 MVC App to ASP.NET Core 2.0, and also integrate with Azure AD B2C.
I have a couple of problems with integrating my current app service mywebsite.azurewebsites.net
with Azure AD B2C.
I followed Creating a Azure AD B2C steps to create a AD B2C. Then I observed that this resource goes under the domain onmicrosoft.com
. Under the DIRECTORY link under my profile, I can see the domain something.onmicrosoft.com
.
Now when I go and register an app, I have to provide the web pages that exist under onmicrosoft.com
which I don't have. All the web pages that I have are under the domain mywebsite.azurewebsites.net
.
How can I go about having the app service and DIRECTORY resource exist under the same domain mywebsite.azurewebsites.net
or mywebsite.onmicrosoft.com
? I can create a new resource group, resource etc... if required.
Integrate with AD B2C in VS 2015:
Azure Setup:
Azure DIRECTORY:
Register an app with AD B2C:
Upvotes: 1
Views: 622
Reputation: 1232
Azure AD B2C has a sample for .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.
Upvotes: 1