OAuth2, HTTP Error for Password Grant

  • Sam Weddington
    Participant
    # 3 years, 6 months ago

    Hey

    PowerShell from Postman(https://www.postman.com/):

    $headers = New-Object “System.Collections.Generic.Dictionary[[String],[String]]”
    $headers.Add(“Content-Type”, “application/x-www-form-urlencoded”)
    $headers.Add(“Cookie”, “AWSALB=Dwl8LzsvVRpR63yxOW+5wRdOO7tiOnZrxHA1zMld1NGsUWBgY1G5/q2PpYJiXIDzm8NltJufT6X6ruR+9KYv1ZgCjc90eNC4kclGpE2ghYREb48dd20DsCIZa8NV”)

    $body = “grant_type=password&username=another@outlook.com&password=vM6r7p2%236&client_id=AGQjepKEWMeSPwM”

    $response = Invoke-RestMethod ‘http://login.xecurify.com/moas/rest/oauth/token’ -Method ‘POST’ -Headers $headers -Body $body
    $response | ConvertTo-Json

    Output:

    powershell

    Sam

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.