Skip to content
Søren Granfeldt edited this page Nov 10, 2023 · 4 revisions

The Helpers element allows you to define helper values that can be used in your initial flows for the rule. For example, you may want to generate a single GUID that is used in multiple attribute flows.

The top level Helpers element contains one or more helper types from the list below

<Helpers>
  <ScopedGuid Name="DNGuid"></ScopedGuid>
  <Constant Name="Password">
    <Value>Passw0rd!</Value>
  </Constant>
</Helpers>

Each defined helper can be used multiple times in your initial flows by specifying it using the #helper:helpername# notation with 'helpername' referring to the name of the helper specified using the Name attribute on the helper. Helper names must be unique within the scope of the rule.

<AttributeFlowBase xsi:type="AttributeFlowConstant">
  <Constant>#helper:Password#</Constant>
  <Target>unicodePwd</Target>
</AttributeFlowBase>

Helper types

Below you can see the currently supported helpers. Additional helpers will be added in future versions.

ScopedGuid

This helper allows you to generate a GUID once and use it several times. This is useful if you need to set both an anchor and a [DN] to the same value in your initial flows.

<ScopedGuid Name="DNGuid"></ScopedGuid>

Constant

This helper allow you to define a constant once, that can be reused throughout your rule set.

<Constant Name="Password">
  <Value>Passw0rd!</Value>
</Constant>

Random Password Generator

This helper function generates a random password of specified length each time it's called. System.Security.Cryptography is used rather than System.Random for stronger randomness guarantees. Passwords are created from a fixed set of characters which limits the potential randomness but maintains compatibility with some legacy systems.

<Helpers>
  <RandomPassword Name="RndPassword" Length="48"></RandomPassword>
</Helpers>
Clone this wiki locally