I'm studying ways to integrate OpenId Connect with Azure Function + .NET 8 Isolated Mode and, as I haven't found better links on the internet, I would like to know the best way to do this and what steps I could follow.
I would like to know which examples I can follow, which links are useful for more practical research and to know the requirements to meet the demand.
First you need to register the App in Microsoft Entity ID and get the credentials.
Refer this MSDoc to register the App with Identity Provider.
https://funcad.azurewebsites.net/.auth/login/aad/callback
OR
For Localhost
https://localhost:8000/.auth/login/aad/callback
local.settings.json
file, add the credentials, you can get the credentials from the Registered App.My local.settings.json
file:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"AzureAd:Instance": "https://login.microsof****tonline.com/",
"AzureAd:TenantId": "******",
"AzureAd:ClientId": "******",
"AzureAd:ClientSecret": "******"
}
}
Microsoft.Identity.Web
package.Thanks @Try Catch Debug for the clear steps to integrate code in Program.cs
and Function file.
Refer this doc and integrate the code.