question

raja-0738 avatar image
0 Votes"
raja-0738 asked MarileeTurscak-MSFT edited

How we can sync windows account name from Onpremises to Azure AD?

We have Azure AD connect to sync objects from On-premises Active Directory to Azure AD & want to sync the Windows Account Name (Domain\samaccountname) to azure AD.

Is it possible to sync Windows Account Name (Domain\samaccountname) to azure AD?

Can anyone please advice how we can do that?

Thanks much.

azure-active-directoryazure-ad-connect
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MarileeTurscak-MSFT avatar image
0 Votes"
MarileeTurscak-MSFT answered MarileeTurscak-MSFT edited

Azure AD Connect synchronizes the on-premises SamAccountName to Azure AD as OnPremisesSamaccountName, and it's mapped to "accountName" in the metaverse.

For the newer versions of Graph API, it's exposed using either of these calls in Graph Explorer:

 https://graph.microsoft.com/v1.0/users/synceduser@example.com?$select=onPremisesSamAccountName

 https://graph.microsoft.com/beta/users/synceduser@example.com

Related threads, for reference:
https://docs.microsoft.com/en-us/answers/questions/95273/how-to-add-samaccountname-as-a-soirce-attribute-in.html

https://social.msdn.microsoft.com/Forums/en-US/e400c1c8-c803-4af1-8a90-0a1ff246f844/samaccountname-attribute-in-azure-ad?forum=WindowsAzureAD

Let me know if this helps.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.