Open the dat file with notepad, and you will get the refresh token: ![]() You can get the refresh token from the auto saved Azure context (usually at C:\Users\\.Azure\TokenCache.dat). ![]() Use refresh token to acquire token, and connect to Azure Get-AzContext -Name 'CSP Azure (e5b0****-****-****-****-5e5f****4c68) - you want to manually do it, here is the sample: # Interactively log for one timeĪnd in another PS session, you can: Import-AzContext -Path D:\ctx.datĢ. # If you have more than one contexts, you can choose one by specifing the name If you enabled auto save, then you can directly get the context as following: Get-AzContext You can enable auto save, or manually save the context to a file, and then use it in another PS session. If you will run the script locally or in a specific PC ![]() If you must log in as a user, there might be 2 optional approaches.
0 Comments
Leave a Reply. |