Ensure that Azure container registries have managed identity enabled.
Enabling managed identities eliminate the need for developers having to manage credentials by providing an identity for the Azure resource in Azure AD and using it to obtain Azure Active Directory (Azure AD) tokens.
Modify container registry and enable managed identity.