Azure AD users and groups synced from an on-premises AD have a field called onPremisesDomainName
. The description is as follows:
Contains the on-premises domainFQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. Read-only.
Source: https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0
How do I get the exact value that will be written to this field by the Azure AD Sync by querying the on-premises domain controller via LDAP from Java?