cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Creating AD account and Referencing it in same WF

When creating an AD account in a workflow, can we query the AD for the newly created account straight away? I have tried to put in a 10 minute pause but I cannot pick up the newly created AD account for some reason.

 

The scenario is, the user is presented with a form, he fills it with the first and last name and manager. Using the Create AD account action, we go and provision an AD account (which is done successfully). The WF has to automatically populate a "User" field with the newly created AD account. This field is then used later on in the workflow.

 

I have verified that the user account is created as after a few minutes, I go to a different list and search for the newly created user (in a person field) and the account does show up.

 

I am wondering if there are any gotcha's with the create AD account action and that I cannot search for the user within the same WF.

 

Thanks

Labels: (3)
0 Kudos
Reply
4 Replies
shahrzad
Nintex Newbie

Re: Creating AD account and Referencing it in same WF

Hi Krishant,

Could you please let me know how you are trying to find the user in same workflow? What action you are using? Is it set item permission? Are you passing right format to search the new AD user?

0 Kudos
Reply
Not applicable

Re: Creating AD account and Referencing it in same WF

Hi Shahrzad.

Once I create the user in AD, I make an LDAP query and try to get the sAMAccountName and UPN of the user. I use a string builder to build the Login name of the user for SP.

However, I find that the LDAP query (made after the Create AD account action) returns null for some reason. I thought this might be a timing issue so I introduced a pause as well (upto 10 minutes). But this still wasnt working. Once the LDAP Query is run, the WF error'd out. But as soon as the WF error'd out, I check AD and I see the account is created. This makes me think that Nintex is possibly doing both Create AD account and the LDAP query call in batch and that is why the LDAP is returning null.

Currently I am using a workaround and using the same strings to create the AD account and for the string builder (removing the LDAP query). This is working but I feel this isn't as robust.

0 Kudos
Reply
shahrzad
Nintex Newbie

Re: Creating AD account and Referencing it in same WF

Hi Krishant,

I am not sure about your query LDAP configuration. Could you please make sure you are able to get result form the action if you try to find an old created user? Could you please share your action configuration page screen shot? What is the error you get when using Query LDAP action? Please create a simple workflow with this action and make sure it is working for you.

0 Kudos
Reply
igorsp
Nintex Newbie

Re: Creating AD account and Referencing it in same WF

Once the account is created it is available for the Query LDAP or Update AD user actions within the same workflow. You are not able to do a Query user profile action as the profile most likely doesn't exist at this point. You need to create it within the workflow or wait until it is created by SharePoint.

Just out of curiosity why do you need to query the AD account you just created? It seems to me that you already have all the information?

0 Kudos
Reply