This video has demo on - Azure App Service | Azure AD | Facebook Auth | Easy Way
Adding Azure AD to App service is very simple and easy. First we have to create asp.net core web app and then we need to create Azure App Service. Creating azure app service will take some time. We need to give unique url to Azure App Service then we can add Azure AD to Azure App Service.
----------------------------------------------------------------------------------------------------
Azure App service Identity Providers
1. Microsoft Identity Provider for azure app service Azure AD
2. Facebook Identity Provider for Azure App Service Azure AD
3. Twitter Identity Provider for Azure App Service Azure AD
4. Google Identity Provider for Azure App Service Azure AD
5. Open ID connect Provider for azure app service Azure AD
--------------------------------------------------------------------------------------------------
This video has detailed explanation to integrate Azure AD with App service using Microsoft Identity Provider and Facebook Identity Provider.
Azure App Service with Facebook Identity Provider :
To enable Facebook Identity Provider to Azure App Service, we need to go to Authentication tab of Azure App Service and click on Add Identity Provider. In the next page, we have to select facebook Identity Provider. We have to create an app registration in developer.facebook.com and configure redirect url, terms and conditions url also need to enable oAuth for client and Web app to enable Azure App Service Facebook Identity Provider. Once everything is setup, we need to change the app mode from development to Live. Then we have to configure AppId and App secret of Facebook app in Azure App Service Identity Provider. In next tab we have to select scope. Once everything is done, we can deploy Asp.net Core Web App to Azure App Service. Once we publish Asp.net Core Web App to Azure App service and access the url, you will be redirected to Facebook login page. you can provide credential and login to Azure App Service which uses Facebook login as Azure AD.
---------------------------------------------------------------------------------------
If you are going to use Azure AD with Microsoft account for App service, It is very simple compared to adding Facebook Authentication to Azure App Service.
You just remove the facebook identity provider from Azure App Service Authentication tab and then click Add Identity Provider again. Now choose Microsoft Authentication. It will create an app registration for you with the required redirect URL where the authentication code will be sent to your asp.net core web application. you can verify the details by going to Azure Active Directory(Azure AD) - App Registrations- you can see an app registration with your web application name. It is most easiest way to add Azure AD Authentication to Azure App Service.
This approach have a limitation. If you want to use Azure Roles or User details for debugging, it is not possible to do without adding code and dependencies like Azure.Identity Package.
-----------------------------------------------------
Chapters
00:00 Introduction
00:35 Creating Azure App Service
01:52 Deploying Asp.net Core Web App to Azure App Service
02:40 Adding Facebook Identity Provider to Azure App Service
03:03 Configuring Facebook app for Azure AD
05:45 Azure App Service Azure AD Authentication
07:15 Limitations of this approach