Hi @Pulipati Vedanth ,
Thanks for using Microsoft Q&A !!
Are you getting any errors ? I am able to create the service principal using listed cmdlet, however, it looks like the cmdlet in the document has additional bacslash('\') which might be causing error while creating the credentials. Can you please run the cmdlet like below if that's the case -
az ad sp create-for-rbac --name {server-name} --role contributor --scopes /subscriptions/{subscription-id}/resourceGroups/{resource-group} --sdk-auth
`
Please refer to az ad sp create-for-rbac.
Please let me know if you are getting any other errors so that we could help you.
Thanks
Saurabh