我的代码有点问题。我想得到我的
TenantID
但该字段为空(null)?我该如何解决?
我在这里忘记了什么吗?
public static string GetMyTenantID(this ClaimsPrincipal principal)
{
return principal.Claims
.Where(c => c.Type == "http://schemas.microsoft.com/identity/claims/tenantid")
.Single().Value;
}