Azure-docs: How to get the Bearer token for validation

Created on 7 Nov 2019  ·  5Comments  ·  Source: MicrosoftDocs/azure-docs

I would like to execute the POST request for validation from my local powershell window. The documents to get the bearer token state the requirement for a clientId which is an ID for an application.
What would be the clientId for my local powershell window?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 azure-resource-managesvc cxp product-question triaged

All 5 comments

@nishantsny - The ID is just the ID for the identity to use for logging in. It could be your user id if you wanted to log in as yourself. More often with scripts, you would create a service principal so the script can run under its own identity. You would grant that service principal the appropriate access in your subscription.

@tfitzmac Thanks for the super quick response. 👍

@tfitzmac Thanks for the response, how do I get my UserID? Also, could you mention documentation on creating service principles

The user id is the id you use to log in to Azure (through portal, PowerShell, CLI, etc.). For service principals, see https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal

@tfitzmac Thanks for the response. 👍
@nishantsny At this point it appears that there's no edits or updates needed for the referred Azure documentation so closing this issue for now. If there are further questions regarding this matter or feedback on the documentation, please do let us know and we will gladly continue the discussion.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

monteledwards picture monteledwards  ·  3Comments

JeffLoo-ong picture JeffLoo-ong  ·  3Comments

paulmarshall picture paulmarshall  ·  3Comments

bityob picture bityob  ·  3Comments

JamesDLD picture JamesDLD  ·  3Comments