Greetings,
I'm trying to use Power Automate to automate some (on-premise) Active Directory tasks and everything has been working fine, but I'm stumbling upon the issue that the "Get User" action from the Active Directory category in Power Automate does not work when the CN of the user contains blank spaces.
For example, this works fine:
CN=HollyAbbington,OU=Employees,OU=Users,DC=Contoso,DC=Central
But, the following DN does NOT work:
CN=Holly\ ,Abbington,OU=Employees,OU=Users,DC=Contoso,DC=Central
When trying to do so, I get the error that the entry can't be found in AD.
Clearly, the issue is caused by "\," between Holly and Abbington, which is the effect of the displaynames of our users in AD consisting of "First name {blank space} Last Name".
How can I fix this issue? Do I have to replace the "\," with a different symbol so that Power Automate recognizes it? Is there any workaround?
Regards,
None? 😶
Already tried a few other common blank-replacements symbols such as %, emitting the symbol entirely or using CN instead, but none of it works 🙁
Still dealing with the issue. Is there really none who knows a solution for this? I've also checked a few old topics regarding similar issues but they too were unsolved 😕
No experience with on-premise AD with Power Automate (didn't know it supported it, are you using Power Automate Desktop?).
Can you try something like:
CN='Holly Abbington',OU=Employees,OU=Users,DC=Contoso,DC=Central
or
'CN=Holly Abbington,OU=Employees,OU=Users,DC=Contoso,DC=Central'
Or use a variable to hold the user's CName ?
CN=VariableName,OU=Employees,OU=Users,DC=Contoso,DC=Central
Ellis
Yes, using Power Automate Desktop
Tried them both, also using " instead of ' but it didn't help, same problem with the variable
Thanks for the suggestion though!
Something else to try:
Jim Smith | cn=\ Jim Smith \ ,ou=West,dc=MyDomain,dc=com |
Many years ago I used VbScript to perform AD and Windows tasks.
Ellis
Looked promising but sadly it didn't work ☹️
😡
Hey pls try this =
CN="Holly\ ,Abbington",OU=Employees,OU=Users,DC=Contoso,DC=Central
Just remove the "\" and put " around the name - just had the same issue and this resolved for me (if you have the space before the comma then change as in the second version below):
CN="Holly, Abbington",OU=Employees,OU=Users,DC=Contoso,DC=Central
CN="Holly ,Abbington",OU=Employees,OU=Users,DC=Contoso,DC=Central
assuming that you have successfully connected to AD using:
LDAP://DC=Contoso,DC=Central
I would use Lastname, Firstname, so in my case it would be:
CN="Abbington, Holly",OU=Employees,OU=Users,DC=Contoso,DC=Central
instead of:
CN=Abbington\, Holly,OU=Employees,OU=Users,DC=Contoso,DC=Central
but verify the Distinguished Name first.
Here is some helpful info:
Active Directory - Power Automate | Microsoft Docs
We have user accounts in different OUs.... is there a way to find the DN in a Desktop Flow? Like search for the user first and then use Unlock?
User | Count |
---|---|
27 | |
14 | |
12 | |
10 | |
9 |
User | Count |
---|---|
50 | |
29 | |
28 | |
24 | |
20 |