I have created one organizational unit inside my active directory and added a user inside that OU.
DistinguishedName : CN=Alex Shaun,OU=TestOU,DC=mydomain,DC=com
Enabled : True
GivenName : Alex Name : Alex Shaun
ObjectClass : user ObjectGUID : 16fc9afc-02a5-474f-8837-4e71853y1ceb
SamAccountName : alex SID : S-1-5-21-233531163-xxxxxxx-2764101054-1604
Surname : Shaun
UserPrincipalName : [email protected]
After doing I synced that user into my azure using azure ad connect. Now I am using Microsoft Azure API to get user information but it does not contain any information regarding OU.
{
"businessPhones": [],
"displayName": "Alex Shaun",
"givenName": "Alex",
"jobTitle": null,
"mail": null,
"mobilePhone": null,
"officeLocation": null,
"preferredLanguage": null,
"surname": "Shaun",
"userPrincipalName": "[email protected]",
"id": "xxxx-0744-47cb-ad48-xxxxxxxx"
},
CodePudding user response:
Azure Active Directory is a flat structure containing user, groups & computer objects
Azure Active Directory does not have OUs
So, you would not be able to see OU information in the Azure Active Directory