Thank you for reaching Microsoft Q&A Forum!
To call a web API in a custom policy, you need to define a RESTful technical profile that specifies the endpoint of the web API and the HTTP method to use. You can then reference this technical profile in your user journey to make the call to the web API.
Here's an example of how to define a RESTful technical profile in your custom policy:
<TechnicalProfile Id="MyWebApi">
<DisplayName>My Web API</DisplayName>
<Protocol Name="REST" />
<OutputFormat>json</OutputFormat>
<Metadata>
<Item Key="ServiceUrl">https://mywebapi.com/api/endpoint</Item>
<Item Key="AuthenticationType">Bearer</Item>
<Item Key="SendClaimsIn">Body</Item>
</Metadata>
<CryptographicKeys>
<Key Id="BearerToken" StorageReferenceId="B2C_1A_TokenSigningKeyContainer" />
</CryptographicKeys>
<InputClaims>
<InputClaim ClaimTypeReferenceId="objectId" Required="true" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="myOutputClaim" />
</OutputClaims>
<UseTechnicalProfileForSessionManagement ReferenceId="SM-Noop" />
</TechnicalProfile>
Thanks,
Akhilesh.