REST token from Azure powershell script

tim.poth's Avatar


10 Jan, 2017 05:08 PM

I need to pull some data back from azure that i can only get at with the azure rest API. Do you guys have an example of run an azure powershell script and pulling out the auth token so i can build a header and make the rest call?

  1. Support Staff 1 Posted by Shannon Lewis on 11 Jan, 2017 04:15 AM

    Shannon Lewis's Avatar

    Hi Tim,

    Thanks for getting in touch! I've asked around the development team and we don't have any examples of pulling out the token to use in REST calls.

    The code we use in Calamari is open source, so if you want to see how we authenticate the Powershell context have a look on GitHub. You may be able to do something similar and run another authenticate to get the data you need for authenticating the calls.

    Alternatively, Microsoft have a sample on authenticating the API calls that might be of use.

    Hope that helps!


  2. Paul Stovell closed this discussion on 11 Apr, 2017 02:15 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac