Skip to content

Instantly share code, notes, and snippets.

@dtkloud dtkloud/Auth.ps1
Created Apr 3, 2019

What would you like to do?
$client_key = "<your client key>"
$client_secret = "<your secret>"
$body = "grant_type=client_credentials&client_id=$client_key&client_secret=$client_secret&scope=NSMS"
$Authorization = Invoke-RestMethod "" -Method POST -ContentType "application/x-www-form-urlencoded" -Body $body -ErrorAction STOP
$access_token = $Authorization.access_token
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.