Follow Us:
This is another issue from the trenches as I was working with a client of mine recently with a disconnect between the SharePoint User Profile Service and Search.
The fix is surprisingly simple, and you will face palm once you realize what the cause is but I thought it was important to document for others.
Like a lot of organizations, one of my clients has a robust search-based Staff Directory (they are using SharePoint Online in Office 365). They sync from a local AD and push to Online via the standard dirsync. They came to me and gave me a new requirement – we need to remove certain contractor and vendor accounts from showing up.
“That makes sense, I’m glad to help.”
The users to exclude weren’t denoted as a vendor or contractor account via any property that I could key off of (e.g. where Job Title = Contractor).
However, all of the users were located in the same OU in the local AD, so maybe I could use the OU path. If we look at the Distinguished Name user profile property in Online, what do we find? For a user it looks like this:
CN=6d7b0213-f5fc-4375-8417-466e806316b1,OU=228e4d92-01f0-4378-a468-d14fe54de509,OU=Tenants,OU=MSOnline,DC=SPODS1367740882,DC=msoprd,DC=msft,DC=net
Not very helpful! In Azure Active Directory, all your users in your tenant are put in one single OU. You can create different OUs, but it’s weird and just not the right fix for us here.
Instead, I created a custom user profile property called “Exclude from Staff Directory” of type boolean (Yes/No).
I went and checked the box on the profiles for the small numbers of users that fell into this category, and waited. And waited, and waited.
After 48 hours there was still no crawled property existing that I could map a managed property to in search. Houston we have a problem! You have to wait for a full search crawl to run to pick up this new property, and have users with this property to get back for it. This is SharePoint Online, and that generally happens in 24 hours.
We found out the problem was due to a simple oversight on my part. If you look at the settings of your custom user property, review the Privacy settings.
This was set to Only Me. It turns out that you think this might not matter, it does. It needs to be set to Everyone. Once another 24 hours wait and full search crawl happened, I got my crawled property to show like I wanted.
Now I can map that to a search managed property, and add that to my search based Staff Directory to get them excluded.
It’s always turns out that the smallest things cause big issues!
Please contact us if you need assistance with implementing your own Staff Directory or even SharePoint!
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
Request Download
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.