AgentClaims.GetAppId Method

Definition

Overloads

Name Description
GetAppId(JwtSecurityToken)
GetAppId(ClaimsIdentity)

Retrieves the AppId from the given claims identity.

GetAppId(JwtSecurityToken)

public static string GetAppId(System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken);
static member GetAppId : System.IdentityModel.Tokens.Jwt.JwtSecurityToken -> string
Public Shared Function GetAppId (jwtToken As JwtSecurityToken) As String

Parameters

jwtToken
JwtSecurityToken

Returns

Applies to

GetAppId(ClaimsIdentity)

Retrieves the AppId from the given claims identity.

public static string GetAppId(System.Security.Claims.ClaimsIdentity claimsIdentity);
static member GetAppId : System.Security.Claims.ClaimsIdentity -> string
Public Shared Function GetAppId (claimsIdentity As ClaimsIdentity) As String

Parameters

claimsIdentity
ClaimsIdentity

The claims identity containing the token information.

Returns

The AppId as a string, or null if not found.

Remarks

For requests from the channel, the AppId is in the Audience claim of the JWT token. For the emulator, it is in the AppId claim. For unauthenticated requests, anonymous claimsIdentity is provided if auth is disabled.

Applies to