A cloud-based identity and access management service for securing user authentication and resource access
The error is caused by a Conditional Access / Azure Policy requirement that the specific create/update/delete operation be performed with an MFA-authenticated token that satisfies the policy, even though an MFA challenge was completed at sign-in.
For Azure CLI, this scenario is explicitly called out: when a policy enforces MFA for certain resource operations, Azure CLI can return errors like:
Resource was disallowed by policy. Reasons: MFA is required.
In enforcement mode, each denied create/update/delete is logged as a deny event, and the client (Azure CLI) shows this message when the token used for the operation does not meet the MFA requirement.
To resolve:
- Ensure the tenant’s Conditional Access policy enforces MFA at sign-in rather than only as a per-resource requirement. This allows the CLI session token obtained at
az loginto satisfy the policy for subsequent resource operations. - If enforcing MFA at sign-in is not possible, use the
--claims-challengeflow so the CLI can obtain a token that meets the policy for the specific operation:
The claims challenge token is provided in the error details when using Azure CLI 2.76.0 or later.az logout az login \ --tenant "<tenant-id>" \ --scope "https://management.core.windows.net//.default" \ --claims-challenge "<claims-challenge-token>" - If the organization is enforcing MFA via Azure Policy (MFA self-enforcement), review the deny events in the activity log to confirm that the policy is blocking the
az containerapp updateoperation. Adjust the policy or ensure that the sign-in token is MFA-compliant for that operation.
Because az group list is a read-only operation, it is not blocked by the MFA-enforcement policy, while az containerapp update is a write operation and therefore subject to the MFA requirement.
References: