I've got a rule that is supposed to look for a unique username and then
rename the object to the first available unique name it has found, however
it appears it's not working. I've used the unique name token several times
before and never had this issue, but I'm sure I'm probably just missing
something stupid. I'm using this on a NULL driver that picks up users
created in a temp container from a workflow I have running in the User App.

Below is the code if anyone can shed any light on what I'm missing here I
would be very appreciative!!


<do-if>
<arg-conditions>
<and>
<if-attr name="preferredName" op="available"/>
</and>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="lvarNewCN" scope="policy">
<arg-string>
<token-unique-name counter-digits="3" counter-pad="true"
counter-pattern="all" counter-use="fallback" name="CN"
on-unavailable="error" scope="subordinates">
<arg-dn>
<token-text
xml:space="preserve">rackspace\users\active</token-text>
</arg-dn>
<arg-string>
<token-attr name="preferredName"/>
<token-text xml:space="preserve">.</token-text>
<token-attr name="Surname"/>
</arg-string>
<arg-string>
<token-attr name="preferredName"/>
<token-text xml:space="preserve">.</token-text>
<token-attr name="Initials"/>
<token-text xml:space="preserve">.</token-text>
<token-attr name="Surname"/>
</arg-string>
<arg-string>
<token-attr name="Given Name"/>
<token-text xml:space="preserve">.</token-text>
<token-attr name="Surname"/>
</arg-string>
</token-unique-name>
</arg-string>
</do-set-local-variable>
</arg-actions>


<do-rename-src-object>
<arg-string>
<token-lower-case>
<token-local-variable name="lvarNewCN"/>
</token-lower-case>
</arg-string>
</do-rename-src-object>

Thanks in advance!!


JK