This is giving me an error (forgive my F#):
#r "nuget: FSharpPlus"
#r "nuget: Auth0.Core"
#r "nuget: Auth0.ManagementApi"
open FSharpPlus
open System.Threading.Tasks
open Auth0
open Auth0.ManagementApi
open Auth0.ManagementApi.Models
let token = "..."
let client = Auth0.ManagementApi.ManagementApiClient(token, "https://redacted.ca.auth0.com/")
let req = GetUsersRequest()
let result = client.Users.GetAllAsync(req).Result
System.AggregateException: One or more errors occurred. (The format of value 'Bearer
’ is invalid.)
The token is valid JWT tested on JWT.io generated from the Auth0 Management API page. It also works in the docs.
Any idea what’s going on here?
Thanks in advance!