Auth0 Home Blog Docs

.NetCore Invalid Token while calling management Api


My Technology stack is :
.Auth0 NugetPackage:

I ma using The management Api. I’m able to receive the token from the first call at then I am creating a ManagementApiClient wihtt he access_token and my domain name. like this:

        var client = new ManagementApiClient(JObject.Parse(response.Content)["access_token"].Value<string>(), "");

Then I’m trying to get a user with:
var user = await client.Users.GetAsync(userId)

I’m getting Invalid token from api. I am sure that there is a setting, in auth0 profile, that i’m missing but I can’t find it.


I am getting the authorization but when I try to authenticate with the bearer i get unauthorized , invalid token. I can’t understand why


:wave: @radu.pop1 how are you obtaining the token for the management API? Please let me know if you were able to solve your issue?