What is the property inside sharepoint user profile service which indicate that the user is blocked

Steel Contributor

I am working on adding an external app to build an Org chart inside a sharepoint modern page, now the app will read the users' info and their managers from the sharepoint user profile service. when i first load the Org chart i find that some leavers are showing, so i apply the following filtering:-

 

SPS-HideFromAddressLists == "No" || SPS-HideFromAddressLists == "False"

 

and a lot of leavers will no more show which is great. but still we  have couple of users who are blocked, as follow:-

userprofile.png

 

but still been shown inside the Org chart. so my question is which property inside the sharepoint user profile service indicates if the user is Blocked or not? so i can add additional filtering to the Org chart app to exclude blocked users? now the app will allow us to use those properties:-

 

AboutMe (About me)
AccountName (Account name)
ADGuid (Active Directory Id)
SPS-Responsibility (Ask Me About)
Assistant (Assistant)
SPS-Birthday (Birthday)
SPS-ClaimProviderID (Claim Provider Identifier)
SPS-ClaimProviderType (Claim Provider Type)
SPS-ClaimID (Claim User Identifier)
SPS-DataSource (Data source)
DelveFlags (DelveFlags)
Department (Department)
SPS-DisplayOrder (Display Order)
SPS-DistinguishedName (Distinguished Name)
SPS-DontSuggestList (Don’t Suggest List)
SPS-Dotted-line (Dotted-line Manager)
SPS-EmailOptin (Email Notifications)
Fax (Fax)
FirstName (First name)
SPS-HireDate (Hire date)
HomePhone (Home phone)
UserProfile_GUID (Id)
SPS-Interests (Interests)
SPS-JobTitle (Job Title)
SPS-LastColleagueAdded (Last Colleague Added)
SPS-LastKeywordAdded (Last Keyword Added)
LastName (Last name)
Manager (Manager)
SPS-MasterAccountName (Master Account Name)
SPS-MemberOf (MemberOf)
CellPhone (Mobile phone)
SPS-MySiteUpgrade (My Site Upgrade)
PreferredName (Name)
SPS-ObjectExists (Object Exists)
Office (Office)
SPS-Location (Office Location)
OfficeGraphEnabled (OfficeGraphEnabled)
SPS-OWAUrl (Outlook Web Access URL)
SPS-PastProjects (Past projects)
SPS-Peers (Peers)
PersonalURL (Personal URL)
PersonalSpace (Personal site)
SPS-PhoneticDisplayName (Phonetic Display Name)
SPS-PhoneticFirstName (Phonetic First Name)
SPS-PhoneticLastName (Phonetic Last Name)
PictureURL (Picture)
PreferredDataLocation (PreferredDataLocation)
SPS-ProxyAddresses (Proxy addresses)
PublicSiteRedirect (Public site redirect)
PulseMRUPeople (PulseMRUPeople)
QuickLinks (Quick links)
SPS-ResourceAccountName (Resource Forest Account Name)
SPS-ResourceSID (Resource Forest SID)
SID (SID)
SPS-SipAddress (SIP Address)
SPS-AdjustHijriDays (SPS-AdjustHijriDays)
SPS-AltCalendarType (SPS-AltCalendarType)
SPS-CalendarType (SPS-CalendarType)
SPS-ContentLanguages (SPS-ContentLanguages)
SPS-Department (SPS-Department)
SPS-FeedIdentifier (SPS-FeedIdentifier)
SPS-FirstDayOfWeek (SPS-FirstDayOfWeek)
SPS-FirstWeekOfYear (SPS-FirstWeekOfYear)
SPS-HashTags (SPS-HashTags)
SPS-HideFromAddressLists (SPS-HideFromAddressLists)
SPS-Locale (SPS-Locale)
SPS-MUILanguages (SPS-MUILanguages)
SPS-MultiGeoFlags (SPS-MultiGeoFlags)
SPS-O15FirstRunExperience (SPS-O15FirstRunExperience)
SPS-PersonalSiteCapabilities (SPS-PersonalSiteCapabilities)
SPS-PersonalSiteFirstCreationError (SPS-PersonalSiteFirstCreationError)
SPS-PersonalSiteFirstCreationTime (SPS-PersonalSiteFirstCreationTime)
SPS-PersonalSiteInstantiationState (SPS-PersonalSiteInstantiationState)
SPS-PersonalSiteLastCreationTime (SPS-PersonalSiteLastCreationTime)
SPS-PersonalSiteNumberOfRetries (SPS-PersonalSiteNumberOfRetries)
SPS-PictureExchangeSyncState (SPS-PictureExchangeSyncState)
SPS-PicturePlaceholderState (SPS-PicturePlaceholderState)
SPS-PictureTimestamp (SPS-PictureTimestamp)
SPS-PointPublishingUrl (SPS-PointPublishingUrl)
SPS-PrivacyActivity (SPS-PrivacyActivity)
SPS-PrivacyPeople (SPS-PrivacyPeople)
SPS-RecipientTypeDetails (SPS-RecipientTypeDetails)
SPS-RefreshToken (SPS-RefreshToken)
SPS-RegionalSettings-FollowWeb (SPS-RegionalSettings-FollowWeb)
SPS-RegionalSettings-Initialized (SPS-RegionalSettings-Initialized)
SPS-SharePointHomeExperienceState (SPS-SharePointHomeExperienceState)
SPS-ShowWeeks (SPS-ShowWeeks)
SPS-TenantInstanceId (SPS-TenantInstanceId)
SPS-Time24 (SPS-Time24)
SPS-UserPrincipalName (SPS-UserPrincipalName)
SPS-UserType (SPS-UserType)
SPS-WorkDayEndHour (SPS-WorkDayEndHour)
SPS-WorkDayStartHour (SPS-WorkDayStartHour)
SPS-WorkDays (SPS-WorkDays)
SPS-SavedAccountName (Saved Account Name)
SPS-SavedSID (Saved SID)
SPS-School (Schools)
SPS-Skills (Skills)
SPS-SourceObjectDN (Source Object Distinguished Name)
SPS-StatusNotes (Status Message)
SPS-TimeZone (Time Zone)
Title (Title)
UserName (User name)
WebSite (Web site)
WorkEmail (Work e-mail)
WorkPhone (Work phone)
msOnline-ObjectId (msOnline-ObjectId)

2 Replies

@john john As you might be already aware the blocked is partial shutdown of account where you still pay for the user license. Not sure why your org wants to do that but must have some valid reasons.

In out of box way,using SP user profile you can not have any such distinctions between blocked users vs active users. As you are still having the reference alive in AD the user profile service will essentially feed on AD. 

But you can always add a custom column in AD such as "User Status: Active, Inactive" and get in synced with your user profile service which explicitly tells your user status. Then once this is done using your user profile service you can read the appropriate value.

Let me know this helps or not.

@Vikram_SamalOk thanks for the reply. In our case when someone leaves, his/her "Sing-In Status" = "Blocked" and his "Licenses" = "Unlicensed",   as follow, so i think we no longer pay for the license:-

blocked.png

 

You mentioned to create a custom property in AD and sync it to the SP user profile service, but i have these 2 questions about the approach you are proposing:-

1. why i need to create a custom property in AD to indicate if the user if blocked or not? since the info is already inside AD as shown in the above picture?

2.  based on my reading that in sharepoint online user profile service we can not create custom properties, so even if i create the custom property inside AD, then how i am going to map it to the SP user profile service? any advice?

Thanks