I cannot seem to generate a basic successful call to the onelogin API. I can generate a token from a client ID and secret successfully but every call I do with the token that is output gets a 401. Sample code with replaced token below.
Invoke-RestMethod -Uri https://api.us.onelogin.com/api/2/users? -ContentType application/json -Headers @{Authorization="bearer:12345"} -Method Get
I built the command out by hand to prove it was not some error saving the access_token line out to a variable and still 401.