-
Notifications
You must be signed in to change notification settings - Fork 97
Login and Acquire Tokens
Suwat Ch edited this page May 22, 2020
·
19 revisions
- Login interactively
ARMClient.exe login
Note: To login to different envs, set ARMCLIENT_ENV
environment variable to PROD
(default), DOGFOOD
, FAIRFAX
, BLACKFOREST
, MOONCAKE
before calling ARMClient.exe login
. To customize or introduce a new environment, please see ARMConfiguration.
After login successful, the tokens will be cached (encrypted) at %USERPROFILE%\.arm
folder (or set ARMCLIENT_CACHEPATH
env to use different cache folder).
Note: To login to specific tenant (such as Cloud Solutions Provider or CSP scenario), set ARMCLIENT_TENANT
environment variable to the tenant you want to log on to.
- Login with service principal secret. See this blog on how to setup service principal.
ARMClient.exe spn [tenant] [appId] (appKey)
- Login with service principal certificate.
ARMClient.exe spn [tenant] [appId] [pfxFile] (password)
- Login with username and password. This only supports Org Id (non-MSA) account.
ARMClient.exe upn [username] (password)
- List token cache
ARMClient.exe listcache
- Clear token cache
ARMClient.exe clearcache
- Switch token to different tenant.
ARMClient.exe token [tenant]
Note: Often times you want to get token to use for specific subscription. Since subscriptions belong to tenant, you will need to switch to the owning tenant.