Skip to content

az webapp identity assign not working #31837

@carlhoogstoel

Description

@carlhoogstoel

Describe the bug

az webapp identity assign --name name --resource-group resourcegroup fails with following message:

Also, setting the toggle for the web app under Identity through the portal also returns the same issue.

User context is owner.

Any advice would be welcome

Related command

az webapp identity assign

Errors

(FailedIdentityOperation) Identity operation for resource '/subscriptions/subscription/resourceGroups/resourcegroup/providers/Microsoft.Web/sites/webapp' failed with error 'Failed to perform resource identity operation. Status: 'BadRequest'. Response: '{"error":{"code":"BadRequest","message":"Bad request."}}'.'.
Code: FailedIdentityOperation

Issue script & Debug output

debug.txt

Expected behavior

To enable the system managed identity option on the web app or to be able to create a user managed identity in the tenant. Both options fail.

Environment Summary

azure-cli 2.74.0 *

core 2.74.0 *
telemetry 1.1.0

Extensions:
azure-devops Unknown
communication Unknown

Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Config directory 'C:\Users\USER.azure'
Extensions directory 'C:\Users\USER.azure\cliextensions'

Python (Windows) 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botAuto-ResolveAuto resolve by botService AttentionThis issue is responsible by Azure service team.Web Appsaz webappapp-service-generalbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions