I try to create a custom policy and I want to get some claims and send its to my REST API. My API is called with email, givenName, etc... but claims passed by query string like client_id, resource_id and mostly scope are empty.
I found a workaround to get the client_id here : Get the Azure AD B2C Application client id in the custom policy
But I found nothing about the scope.
Here my claims provider for REST API :
<ClaimsProvider>
<DisplayName>REST API</DisplayName>
<TechnicalProfiles>
<TechnicalProfile Id="AzureFunction-SendClaims">
<DisplayName>Send Claims</DisplayName>
<Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"/>
<Metadata>
<Item Key="ServiceUrl">https://XXXX.azurewebsites.net/api/XXXX</Item>
<Item Key="AuthenticationType">None</Item>
<Item Key="SendClaimsIn">Body</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="givenName"/>
<InputClaim ClaimTypeReferenceId="client_id" PartnerClaimType="clientId" DefaultValue="{OIDC:ClientId}"/>
<InputClaim ClaimTypeReferenceId="resource_id"/>
<InputClaim ClaimTypeReferenceId="email"/>
<InputClaim ClaimTypeReferenceId="otherMails"/>
<InputClaim ClaimTypeReferenceId="grant_type"/>
<InputClaim ClaimTypeReferenceId="scope"/>
</InputClaims>
</TechnicalProfile>
</TechnicalProfiles>
</ClaimsProvider>