MrB
Design Dabbler

Check User AD Status and send mail when account status = 514

Jump to solution

Hello Nintex Community,

 

maybe you guys can help me out with my workflow. I have a list with a people picker field called "respondsible" and I want to check if one of this users has been disabled in active directory. When there is a inactive user i want a mail notification with all disabled users.

 

This is my workflow:

wfl_check_account_status.jpg

This is my LDAP Query:

ldap query.jpg

At the moment I only get an error back that The (&(objectCategory=user)(mail=)) search filter is invalid. When I type in the mail adress I get the account status back but with the variable it doesn´t work. I also tried to do the same with samAccountname but i get the same result as with mail.

 

Have anyone an idea why this doesn´t work? In the attachment you will find the hole workflow without personal data.

 

Kind Regards

MrB

0 Kudos
Reply
3 Replies
mlauer
Connector Crackerjack

Re: Check User AD Status and send mail when account status = 514

Jump to solution

This query works for me:

 

(&(objectCategory=person)(objectClass=user)(sAMAccountName={WorkflowVariable:wf_accountname})(!userAccountControl:1.2.840.113556.1.4.803:=2))

0 Kudos
Reply
MrB
Design Dabbler

Re: Check User AD Status and send mail when account status = 514

Jump to solution

Hi mlauer,

 

thanks for your reply i dont get any kind of error with this query but when I have a look into the verbose logging I dont get the AccountStatus for each member of the collection back. And this effects that the "Set Variable" Action will not give me the searched users back into the mail.

 

In my list I have defently disabled users and normally I should get back two users into the mail action but this not happening.

I have tried to execute the query with the accountname of the disabled user:

query.jpg

 And I get no result back. When I try for example my own user I get the right status back "512".

 

Do you have any idea why this is not working in my case?

 

Kind Regards

MrB

0 Kudos
Reply
MrB
Design Dabbler

Re: Check User AD Status and send mail when account status = 514

Jump to solution

Hello together,

 

if someone have the same issue I found a solution on my own. It was just simple within the array the informations had included a prefix like "i:0#.w|domain\" I have used the Build String Action to remove the prefix from my variable. After that I got the right samaccountname to use the ldap query action.

 

Best Regards

MrB

View solution in original post

0 Kudos
Reply