2

I have run into this problem many times and not yet able to find solution to it.

Scenario:

  1. A user John is present in AD but have no permissions on the site.
  2. A user filling out InfoPath form selects John from People Picker Control.
  3. Upon submit, a workflow runs that sends email to the user listed in the People Picker Control.
  4. Since the user John has no permission on the site, workflow throws NULL exception and goes into suspended state.
  5. This leave the workflow in a state where remaning statements don't run and some business rules not applied which is seriously not good.

Please suggest me some solution to this.

1 Answer 1

3

If you are getting this then you must verify that the user to whom you are sending email must have email enabled in Active Directory.

In order to cross verify that which user has email enabled you can run following command into the command prompt.

Dsquery * -filter "&(objectCategory=user)(!UserAccountControl:1.2.840.113556.1.4.803:=2)(mail=*)" -attr name samaccountname mail  > c:\temp\file.txt

This command will give the list of user who has email enabled and you can easily verify whether the user to whom you are sending email through workflow has the email enabled or not.

In case you found your user does not have email enabled then in that case you can refer this to enable email for your user in Active Directory.

Let me know your thoughts.

4
  • We have already verified this and email was enabled. But when we gave access to the user to use the site only then workflow was successfully able to send email.
    – soccer7
    Commented Jul 8, 2016 at 6:08
  • Ok. I assumed that you have already given permission to the user to access site. Commented Jul 8, 2016 at 6:12
  • Yes now we have. But problem comes when a new user is added to AD but not given permissions on SharePoint. Then again workflow gonna fail.
    – soccer7
    Commented Jul 8, 2016 at 6:13
  • Yes. For that we must think of some automated process that assign permission to the SharePoint site to the user who is added to the AD Commented Jul 8, 2016 at 6:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.