Published: 02.Feb 2022

How to find out/verify onprem AD OU location in Azure AD for synced user

First we need ObjectID of Azure AD user, so connect to Azure AD and run (I used email address as SearchString:

(Get-AzureADUser -SearchString "<emailAddress>").ObjectID

Next, let's find out onPremiseDistinguishedName:

(Get-AzureADUser -objectid <id from first step>).ExtensionProperty["onPremisesDistinguishedName"]

Output will be DistinguishedName of the user.

5 1 vote
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
PowerAddict.net - Lubomir Goban  ---  Find me on - 
LinkedIn
0
Would love your thoughts, please comment.x
()
x