While Creating Webapp from ARM Template i need to enable App Service authentication

Yashwant Shrimali 1 Reputation point
2022-06-23T07:38:11.827+00:00

I am craeting a WebApp using ARM Template in Azure and Would like to enable authentication on that Webapp through json template only. Is there any posibility to enable App Service authentication in webapp while creating using ARM Template.

Sample Code:

{
"apiVersion": "2015-08-01",
"name": "[variables('webSiteName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]"
],
"tags": {
"[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty",
"displayName": "Website"
},
"properties": {
"name": "[variables('webSiteName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]",
"httpsOnly": true
},
"resources": [
{
"apiVersion": "2015-08-01",
"type": "config",
"name": "connectionstrings",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites/', variables('webSiteName'))]"
],
"properties": {
"DefaultConnection": {
"value": "[concat('Data Source=tcp:', reference(resourceId('Microsoft.Sql/servers/', variables('sqlserverName'))).fullyQualifiedDomainName, ',1433;Initial Catalog=', parameters('databaseName'), ';User Id=', parameters('administratorLogin'), '@', variables('sqlserverName'), ';Password=', parameters('administratorLoginPassword'), ';')]",
"type": "SQLServer"
}
}
}
]
},

Let me know the possibility and any help would be appriciated.

Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,320 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Cristian SPIRIDON 4,301 Reputation points
    2022-06-25T08:57:30.163+00:00

    Hi,

    You can download the ARM template for any Azure resource and use again to create new resources:

    https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/export-template-portal

    So, you can first create the resource in the Web portal, export and use the template to create new resources.

    Hope this helps!

    No comments