Dear Team ,
I believe the documentation needs to be updated in the below link at the section of “Create a Service Principal”
Link : Build Infrastructure - Terraform Azure Example
where the problem is that command when I run
az ad sp create-for-rbac --role="Contributor" --scopes="/subscriptions/<SUBSCRIPTION_ID>"
it gives that error message :
and it needs to be updated to :
az ad sp create-for-rbac -n "api://putyourappname" --role="Contributor" --scopes="/subscriptions/<SUBSCRIPTION_ID>"
as after I did research to solve it I found this link where Microsoft did a breaking change since Oct 2021 and here is the link :
AppId Uri in single tenant applications will require use of default scheme or verified domains