I'm seriously at the end of my rope trying to troubleshoot an issue we're having in our org, and would appreciate it if anyone has tips, explanations, anything really. This'll get long - I'll try to include a TL;DR at the end. Thanks in advance for any help! Feel free to have a laugh as well, I took some time with this.
Let's start with the original problem. We have a user that's quit, let's call 'em Bob. The user is finished with their two weeks, so they're functionally gone from the organization, and IT starts decommisioning Bob. His account is disabled, his password is reset to something long you'll need to decode, groups are removed, and the user ultimately gets a couple attributes set on their object, to hide them from Exchange, and so on.
Now, Bob's a weird case, and IT is instructed to keep Bob's account around for a bit longer. No biggie, we can do that. His account is hidden from the address lists, and shouldn't pop up in any searches or seem active in any way, we figure.
Nope, as it turns out, we thought we hid Bob by setting appropriate values in AD. But no, we open SharePoint and search for ol' Bobby. Lo and behold, in the People tab lies Bob, now a digital memory, smelling like stained coffee and cheap suits. Strange. But after some poking around, we find the problem: Bob lost his license and was hid away from Exchange, but the license seems to be key. Bob can't get his Exchange status updated if Bob isn't in Exchange, and Bob isn't in Exchange, at least not clearly, since his license was yoinked during decom. We assign Bob a license, give it a little time, and Bob's gone from the search results. This is fine, and makes sorta sense, because:
- Modern search uses the Search API, which looks to the address list for info.
- It seems like Exchange need licenses to update the visibility for a user.
- Assign Bob a license and all seems well.
I've recently learned that the directory address list is not license-dependent, but regardless of root cause, we fixed the problem. Bob's nothing more than a ghost, name roaming documents and deprecated SharePoint libraries.
Then, the plot thickens. See, we have a multitude of user account types. Employees, contractors, consultants, admins, it's like a zoo, except the animal noises are replaced by corporate jargon, and no one wants to look at the encaged animals in meeting room 8, because they're all busy generating value for our shareholders. We don't even have shareholders, but that's irrelevant.
Anyways, an IT employee - Carl - searches up their admin account, aptly named the same as the owner. Carl has two admin accounts, and looks up the one from our on-prem AD. The on-prem account is synced for... reasons, but Carl figures that his account shouldn't be visible; he has never been licensed, after all. But, as it turns out, Thanos was right, and reality is often disappointing. Carl not only finds his admin accounts, but every single on-premise admin account, as well as the ones existing in Entra. Strange.
So, here is the actual problem. Carl's admin account has never touched anything Exchange-related, let alone had a license. The only thing that remotely resembles an email is the UPN for the account in question. By our logic, since Carl hasn't been in Exchange, Carl shouldn't exist in the address list, and should also not be searchable, due to how the Search API queries the data sources. But no, Carl is visible. This doesn't really bother Carl, but some people find this problematic.
Diving into this, Carl finds that they can query the Address List using Powershell. If the user is visible in searches, the user should be visible there as well? But no, there's nothing, and at this point, Carl has been looking into this issue for a while, and is close to going crazy.
TL;DR:
In practice, it's boiled down to a couple questions:
- How can a user be visible in searches if they are not in the address lists?
- What determines the visibility at the end of the day? The attribute can be set for users, but this doesn't seem to do anything on its own.
- How can users effectively be hidden from searches? Are we forced to give the users affected licenses, set msExchHide on every user, and wait for the users to sync?
- Can users be hidden by default somehow?
- Why is Microsoft Search like this? :(
Hopefully someone can help poor Carl (me, that is), preferrably before he moves to Exuma and starts a new life as a fisherman. Thanks in advance for any help - hopefully someone got a little laugh out of this.
Now, to look for fishing gear...