Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure B2C custom policy conditional OrchestrationStep

I am trying to introduce new Orchestration Step based on the value of my custom attribute. My requirement is I want to execute the a orchestration step only if the value of myattribute(boolean attribute) is set to true. The value of myattribute is either set to true or false. I am doing something like this.

<Precondition Type="ClaimEquals" ExecuteActionsIf="true">
  <Value>False</Value>
  <Value>extension_myattribute</Value>
  <Action>SkipThisOrchestrationStep</Action>
</Precondition>

But this step is not skipped irrespective of the value of myattribute. I have added the myattribute as part of the OutPutClaims of AAD-UserReadUsingObjectId. I am able see the value of extension_myattribute in the C#.

Any pointers to examples where value is compared will help me a lot.

like image 273
Jagadish KM Avatar asked Sep 05 '25 13:09

Jagadish KM


1 Answers

For a ClaimEquals precondition, the first <Value /> must be set to the claim type and the second <Value /> must be set to the claim value:

<Precondition Type="ClaimEquals" ExecuteActionsIf="true">
  <Value>extension_myattribute</Value>
  <Value>False</Value>
  <Action>SkipThisOrchestrationStep</Action>
</Precondition>

For a boolean claim, the possible values are "True" and "False".

like image 167
Chris Padgett Avatar answered Sep 09 '25 04:09

Chris Padgett