Getting "The resource server does not exist" when Assigning permissions to the role in .NET

  • Which SDK this is regarding: NuGet Auth0.ManagementApi 7.1.0
  • SDK Version: 7.1.0
  • Platform Version: .NET 5
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

We are getting Auth0.Core.Exceptions.ErrorApiException: The resource server does not exist: "our-API-ID-value’

    ManagementApiClient client = new ManagementApiClient(token, uri, _connection); // where _connection is IManagementConnection
    string roleId = ...; // retrieved from Auth0 via client.Roles.GetAllAsync(new GetRolesRequest { NameFilter = role });
    string apiAid = _settings.ApiId; // valid API ID which is successfully used for retrieving roles.

    string[] permissions = new [] { "some:role:1", "some:role:2" }

    await client.Roles.AssignPermissionsAsync(roleId, new AssignPermissionsRequest // this line failes with the above error
    {
    	Permissions = permissions.Select(x => new PermissionIdentity { Identifier = apiId, Name = x }).ToList()
    });

I have also added an issue on GitHub: Getting "The resource server does not exist" when Assigning permissions to the role in .NET5 · Issue #444 · auth0/auth0.net · GitHub

Pasting the GitHub issue link here so it can be more easily tracked. Let me ping repo maintainers about that in a few minutes!

https://github.com/auth0/auth0.net/issues/444

1 Like

@konrad.sopala there is also a support ticket #00470976 - adding as well for a reference

1 Like

Perfect! Thanks for sharing that!

1 Like

This guy should be used: Getting "The resource server does not exist" when Assigning permissions to the role in .NET5 · Issue #444 · auth0/auth0.net · GitHub

2 Likes

Teamwork makes the dreamwork!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.