- 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