6

We have a standard SharePoint 2013 list that contains several columns. One of the columns is your typical People Picker column. Let's call it the Employee Name column

When we send out an email via a workflow that was designed in SharePoint Designer, in some cases the user who was picked in the Employee Name column does not show up correctly as a lookup in the body of the email message.

For example, if my username in Active Directory is JDOE and there is another employee in AD with a username of JDOE2. If JDOE was selected in the Employee Name column the email being fired off via workflow may actually show JDOE2's information inside the body of the email where I selected Current Item:Employee Name -> Display Name. Almost acting like SharePoint Designer is grabbing the wrong account behind the scenes. This is almost always occurring when similar usernames in AD are found. If we have a username of DOMAIN\billy and another account called DOMAIN\billingservices for another example. You might see the Billing Services information instead of Billy's information even though Billy's name is in the actual list item.

I hope I am making sense. Any insight or help is welcome here as we have several employees with similar AD usernames causing this confusing issue.

3
+50

it looks like your workflow is picking up the last instance of the found pool of names!

so in your case, you have the name JDOE,

the workflow in AD picks up

JDOE and JDOE1 and JDOE2

it would then return JDOE2 as its the last occurance in the array of returned items.

If in the people picker you had JDOE1

it would return JDOE1 only and send the mail to that user only. But if you had JDOE1 and JDOE11

then it would return both accounts back from ad but it would select the last occurance which would be JDOE11 and not JDOE1!

when the search is performed its not performed as a whole word only but rather contains. in sudo code it would be:

result= text%*

%* refers to anything else, so i could search for:

result = ali%*

result from ad:

ali

ali ali

ali home

ali sharepoint

ali test

aliZone

results above are in alphabetic order, the search returns all 'ali' names and anything after ali. the returned result because of a bug would be 'aliZone'

aliZone = ali%*

Just to note that this is a bug in workflows for people picker and Microsoft already knows about it but havent made any corrections in their updates for this bug so far.

for a workaround to this issue, you need to use somthing unique to get the user from AD rather than the name.... todo that change the workflow to get the user account from the user ID property instead.

  • Thanks for the quick response @ali-sharepoint . Can you provide me a link to where Microsoft has identified the issue? My team is looking to see if your suggestion helps us with the issue. – MAllen22842 Aug 12 '14 at 13:16
  • We are trying to get the user's email address as it is placed into a Email action in the workflow. So the ID doesn't help in this case. I need their Email Address and their Display Name. – MAllen22842 Aug 12 '14 at 19:09
  • what i mean by using the id, i mean when setting up the workflow it uses the id of that user from the people picker rather than the username string value... it would then use that id to search against on active directory as its unique it would return the correct username and email! – Ali Jafer Aug 13 '14 at 9:37
  • I am not following. I have taken a screenshot (preview.tinyurl.com/l7uu756) of the lookup that I am seeing in designer and do not see an option to just use the id of the user and then use their email address. Am I missing a step? – MAllen22842 Aug 13 '14 at 13:07
  • the key is getting the user id, from the id get the email and user name and post email. It will involve two actions I believe,1 get the id from the people or group field and second action to lookup for person or group using the variable.... this should point you in the correct direction sharepointanalysthq.com/2011/04/… – Ali Jafer Aug 13 '14 at 23:03
0

I think the issue related to User Profile Services, could you try to run synchronization with Active Directory via PowerShell using following command:

Get-SPUser –Web http://<name of web app> | Set-SPUser –SyncFromAD

or for sync one user

Set-SPUser –Identity '<domain>\<username>' –SyncFromAD –Web http://<name of web app>
  • Thanks for the quick response @roman . My team is looking to see if your suggestion helps us with the issue. – MAllen22842 Aug 12 '14 at 13:17
  • Running both of those cmdlets did not resolve the issue. – MAllen22842 Aug 13 '14 at 12:35
0

Did you use AD Import or SharePoint Sync for your UPS Connection to AD?

We ran into a similar problem having used the sync method for a connection and found that the problem solved could be solved if we disabled NETBIOS names so the profile sync was recovering the AD profiles by Distinguished Name rather than NETBIOS Name.

  • Thanks for responding @jont . The article that explains how to disable NETBIOS names (technet.microsoft.com/en-us/library/…) warns that "If the NetBIOS name of any domain with which you are synchronizing differs from its fully-qualified domain name, you must enable NetBIOS domain names...". This is the case for us. We have somedomain.com as the FQDN and in SharePoint it is just somedomain\username. Make sense? So this option may cause more harm than good in our scenario. – MAllen22842 Aug 13 '14 at 12:52
0

Upgrading to Service Pack 1 (http://support.microsoft.com/kb/2880552) or the December 2013 CU (http://support.microsoft.com/kb/2850024) resolves this issue.

  • When there are similar aliases in SharePoint 2013, workflows retrieve incorrect user names.
  • When you create a list workflow in which the platform type is "SharePoint 2013 workflow" in SharePoint Designer 2013, the workflow may set an incorrect user name in some list item fields.

Resolved this with Microsoft Software Assurance support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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