If you pass in a set of Permissions that would force a change of RoleType, you get a System.NullReferenceException: Object reference not set to an instance of an object.
The exception occurs in AuthPermissions.AdminCode.Services.Internal.ChangeRoleTypeChecks.CheckRoleTypeChangeAsync, Line 102, where the method UserErrorMessageAsync is called. The var formattableString is expecting an instance but is getting null instead.
private async Task<FormattableString> UserErrorMessageAsync(string roleName, bool filterOutNonTenantUsers) {
...logic omitted...
return (num > 0) ? ((FormattableString)$"{num} users are linked to it.") : null;
}
Installed NuGet AuthPermissions.AspNetCore, Version: 9.0.0