Azure Function v4 and PnP Core and Microsoft Entra authenication to Azure Government
How do I get this PnP Core sample https://github.com/pnp/pnpcore/tree/dev/samples/Demo.AzureFunction.OutOfProcess.AppOnly to authenticate to a Government Cloud using Integrate Microsoft Entra authentication with Web Apps on Azure Government ?
The PnP Core sample is a v4 Azure Function but the Microsoft docs are for an earlier version.
I've added "Authentication": { "AzureAd": { "Azure ADInstance": "https://login.microsoftonline.us/", "CallbackPath": "/signin-oidc", "ClientId": "<clientid>", "Domain": "<domainname>", "TenantId": "<tenantid>" } } to the local.settings.json because the appsettings.json does not exist.
Then I added the ConfigureServices method to the Program.cs since the startup.cs doesn't exist.
The services.AddAuthentication is not valid and I can't figure out how to incorporate it into var host = new HostBuilder()
Thanks for any guidance or examples.