azure-cli: WebApp:az webapp auth update not compatible with Auth settings 2.0
Is your feature request related to a problem? Please describe. Using the Azure CLI, it is not possible to script authentication settings on either App Service or Azure Function that were configured using authentication settings 2.0 using.
With Authentication(Classic), it is possible using az webapp auth update
but when trying with a Function App that was configured using the Azure Portal new Authentication UI it fails with Bad Request
.
Running az webapp auth update
on debug
mode it shows the following:
{
"Code": "BadRequest",
"Message": "Cannot execute the request for site func-edl-storage-service-qa because the site is running on auth version v2.",
"Target": null,
"Details": [
{
"Message": "Cannot execute the requestfor site func-edl-storage-service-qa because the site is running on auth version v2."
},
{
"Code": "BadRequest"
},
{
"ErrorEntity": {
"ExtendedCode": "04534",
"MessageTemplate": "Cannot execute the request for site {0} because the site is running on auth version {1}.",
"Parameters": [
"func-edl-storage-service-qa",
"v2"
],
"Code": "BadRequest",
"Message": "Cannot execute the request for site func-edl-storage-service-qa because the site is running on auth version v2."
}
}
],
"Innererror": null
}
Clearly, the CLI commands is not compatible with Authentication 2.0
Describe the solution you’d like
az webapp auth update
should work with App Services and Function Apps configured using the new Portal Authentication UI.
Describe alternatives you’ve considered
- PowerShell: there isn’t a documented method to set Authentication on sites.
Additional context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (9 by maintainers)
Any updates on this? I, too, would like
az webapp auth
to create Auth settings 2.0 instead of classic.This is being worked on by EasyAuth team - i.e to support V2.