Home > Back-end >  How to find SPNAME in Azure portal
How to find SPNAME in Azure portal

Time:08-25

Trying to access files from Azure Netapps via REST API by following documentation https://docs.microsoft.com/en-us/azure/azure-netapp-files/azure-netapp-files-develop-with-rest-api with POSTMAN rest client.

To get appId, password, tenant by executing following command in Azure CLI

az ad sp create-for-rbac --name $YOURSPNAMEGOESHERE --role Contributor --scopes /subscriptions/{subscription-id}

Here what is $YOURSPNAMEGOESHERE? How to fins this value? I am currently using trail account on Azure.

CodePudding user response:

Please note that, the command you are currently using is related to creating service principal and assigning role to it.

In this $YOURSPNAMEGOESHERE , you have to pass the name of the service principal you want to create.

Instead of that, you can also give the name directly in string format like below:

I tried to reproduce the same in my environment like below and got the below results:

az ad sp create-for-rbac --name "TestSP" --role Contributor --scopes /subscriptions/subscriptionId

Output:

enter image description here

Reference:

az ad sp | Microsoft Docs

  • Related