Hello,
Thank you for raising your question in this community.
This error is related to the authentication process. Maybe some privilege checking solve the problem.
Check if the managed identity has the required roles assigned. Depending on what the deployment performs, roles like Contributor or Owner might be needed. Please ensure no firewall restrictions prevent the managed identity from authenticating with Azure services.
Please let me know if you have further questions.
Regards
Zahra