App Service not saving environment variable SENDGRID_API_KEY – value returns null
Subject: App setting variable SENDGRID_API_KEY
not recognized in Azure App Service – value returns null
Description: Hi Microsoft Support,
We have deployed a .NET-based email API (isupplier-emailapi
) using Azure App Service under the resource group youUIGrp
. We have set the SENDGRID_API_KEY
both through the Azure Portal (under Environment Variables) and CLI:
az webapp config appsettings set --name isupplier-emailapi --resource-group youUIGrp --settings "SENDGRID_API_KEY=SG.xxxxxx"
However, our deployed application cannot read this environment variable at runtime. It returns null
, resulting in an error: "Missing SENDGRID_API_KEY"
We’ve also tried:
Setting via CLI multiple formats (--settings key=value
, JSON, etc.)
Restarting the app
Verifying the variable appears in the App Settings list
The value is still not picked up. Could you please investigate and fix this for us? We’re happy to provide access or any additional details you need.
Thank you,
Kate Trieu
******@youc.com.au