ClaimsPrincipalExtensions.GetHomeObjectId(ClaimsPrincipal) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the Home Object ID associated with the ClaimsPrincipal.
public static string? GetHomeObjectId (this System.Security.Claims.ClaimsPrincipal claimsPrincipal);
static member GetHomeObjectId : System.Security.Claims.ClaimsPrincipal -> string
<Extension()>
Public Function GetHomeObjectId (claimsPrincipal As ClaimsPrincipal) As String
Parameters
- claimsPrincipal
- ClaimsPrincipal
The ClaimsPrincipal from which to retrieve the sub claim.
Returns
Home Object ID (sub) of the identity, or null
if it cannot be found.