Multi tenancy System.NullReferenceException: 'TenantId claim not found' tenantClaim was null. #7128
Unanswered
mvmshakkir
asked this question in
Help
Replies: 1 comment
-
Hi! Did you manage to solve it? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
my code is
public static ClaimsPrincipal CreatePrincipal(IUserRetrieveService userRetriever, string username, string authType, int TenantId)
{
if (userRetriever is null)
throw new ArgumentNullException(nameof(userRetriever));
}
using System;
using System.Linq;
using System.Security.Claims;
namespace DailyStandUp
{
public static class ClaimsPrincipalExtensions
{
public static int GetTenantId(this ClaimsPrincipal user)
{
if (user is null)
throw new ArgumentNullException(nameof(user));
}
here it throwing error System.NullReferenceException: 'TenantId claim not found'
tenantClaim was null.
Beta Was this translation helpful? Give feedback.
All reactions