REST token from Azure powershell script

tim.poth's Avatar

tim.poth

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?
thanks
tim

  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!

    Shannon

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? 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

Recent Discussions

20 Jan, 2017 05:23 AM
20 Jan, 2017 04:24 AM
20 Jan, 2017 03:16 AM
20 Jan, 2017 02:36 AM
20 Jan, 2017 02:32 AM