{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "siteName": { "type": "string", "metadata": { "description": "Name of the Web App." } }, "location": { "type": "string", "defaultValue": "[resourceGroup().location]", "metadata": { "description": "Location for all resources." } }, "clientId": { "type": "string", "metadata": { "description": "Microsoft Entra App Client ID" } }, "clientSecret": { "type": "securestring", "metadata": { "description": "Microsoft Entra App Client Secret" } }, "tenantId": { "type": "string", "metadata": { "description": "Microsoft Entra Tenant ID" } }, "redirectUri": { "type": "string", "metadata": { "description": "Redirect URI for authentication callback" } } }, "resources": [ { "type": "Microsoft.Web/serverfarms", "apiVersion": "2020-12-01", "name": "[concat(parameters('siteName'), '-plan')]", "location": "[parameters('location')]", "sku": { "name": "B1", "tier": "Basic", "size": "B1", "family": "B", "capacity": 1 }, "properties": { "reserved": true } }, { "type": "Microsoft.Web/sites", "apiVersion": "2020-12-01", "name": "[parameters('siteName')]", "location": "[parameters('location')]", "dependsOn": [ "[resourceId('Microsoft.Web/serverfarms', concat(parameters('siteName'), '-plan'))]" ], "properties": { "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', concat(parameters('siteName'), '-plan'))]", "siteConfig": { "linuxFxVersion": "PYTHON:3.13", "appCommandLine": "gunicorn --bind=0.0.0.0:$PORT --timeout 600 app:app", "appSettings": [ { "name": "CLIENT_ID", "value": "[parameters('clientId')]" }, { "name": "CLIENT_SECRET", "value": "[parameters('clientSecret')]" }, { "name": "TENANT_ID", "value": "[parameters('tenantId')]" }, { "name": "REDIRECT_URI", "value": "[parameters('redirectUri')]" }, { "name": "AUTHORITY", "value": "https://login.microsoftonline.com/common" }, { "name": "SCOPE", "value": "User.Read" }, { "name": "SESSION_TYPE", "value": "filesystem" } ] } } } ] }