Share via


SkillValidation.IsSkillClaim(IEnumerable<Claim>) Method

Definition

Checks if the given list of claims represents a skill.

public static bool IsSkillClaim (System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims);
static member IsSkillClaim : seq<System.Security.Claims.Claim> -> bool
Public Shared Function IsSkillClaim (claims As IEnumerable(Of Claim)) As Boolean

Parameters

claims
IEnumerable<Claim>

A list of claims.

Returns

True if the list of claims is a skill claim, false if is not.

Remarks

A skill claim should contain: An VersionClaim claim. An AudienceClaim claim. An AppIdClaim claim (v1) or an a AuthorizedParty claim (v2). And the appId claim should be different than the audience claim. When a channel (webchat, teams, etc.) invokes a bot, the AudienceClaim is set to ToBotFromChannelTokenIssuer but when a bot calls another bot, the audience claim is set to the appId of the bot being invoked. The protocol supports v1 and v2 tokens: For v1 tokens, the AppIdClaim is present and set to the app Id of the calling bot. For v2 tokens, the AuthorizedParty is present and set to the app Id of the calling bot.

Applies to