How to deploy appsettings values to Azure.

Richard Scannell 426 Reputation points
2022-12-09T09:29:20.757+00:00

I am trying to deploy an MVC app to Azure to use Azure AD authentication, Everything works fine on localhost, but I can't see where the config parms from appsettings.json would upload to in Azure. I understand that the file is not included when I publish it to Azure, but I can't get the values from appsettings.json below :

{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"AzureAd": {
"Instance": "https://login.microsoftonline.com/",
"Domain": "MyDomain",
"TenantId": "123456789...",
"ClientId": "987654321.....",
"CallbackPath": "/signin-oidc"
},
"MicrosoftGraph": {
"BaseUrl": "https://graph.microsoft.com/v1.0",
"Scopes": "user.read"
}
}
To fit into the configuration tab's Application Settings , which even in Advanced edit, is expecting a different JSON structure :
EG
{
"name": "ASPNETCORE_ENVIRONMENT",
"value": "Development",
"slotSetting": false
}

Please can you advise how to get the parameters deployed.

Thanks in advance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,981 questions
{count} votes

Accepted answer
  1. Sam Cogan 10,812 Reputation points Microsoft Employee Volunteer Moderator
    2022-12-09T09:43:58.517+00:00

    Your package only contains files that are used in the web app code its self. The Application settings on the app service are separate and need to be configured through the UI, CLI or using Infrastructure as Code such as Bicep or Terraform.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.