# Import Users from AD to Auth0 for SSO

**URL:** <https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850>\
**Category:** Get Help\
**Tags:** azure-ad-enterprise-connection, connections\
**Created:** [April 12, 2024, 8:41am UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850 "2024-04-12T08:41:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![srinivas2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@srinivas2](https://community.auth0.com/u/srinivas2)\
**Post date:** [April 12, 2024, 8:41am UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850/1 "2024-04-12T08:41:39Z")

</div>

My application is using Auth0 for authenticating the users. For a client we are trying to do SSO with their Azure Active Directory.  
Registered an Application in the Azure and provided the required information regarding the application redirect and login url in it. Also created a enterprise connection in Auth0 with the client id and secret from the Azure application.  
In my application the pages are displayed based on the features assigned to the User. For this new integrated SSO with this new client i want to load the AD users into Auth0, so that those users will flow into my application and i can assign the required permissions for them to view the page when they try logging in first time.

How can i import the AD users into Auth0 and create the Auth0ID before they start accessing the application?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [April 12, 2024, 1:36pm UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850/4 "2024-04-12T13:36:37Z")

</div>

Hey there @srinivas2 , thank you for posting!

To migrate users from external data store to your Auth0 tenant, you have 2 options:

- [gradually migrate them during login](https://auth0.com/docs/users/guides/configure-automatic-migration?_gl=1*voit53*_gcl_au*MTk2ODgxMTkyNi4xNzA5MTMwMzE4*_ga*MTkwOTg3NjEzNC4xNzAxMzU0MTkw*_ga_QKMSDV5369*MTcxMjkyMzY4MC45Ni4xLjE3MTI5Mjg0NzAuNjAuMC4w) or
- [performing bulk migration](https://auth0.com/docs/users/guides/bulk-user-imports?_gl=1*4nqm4o*_gcl_au*MTk2ODgxMTkyNi4xNzA5MTMwMzE4*_ga*MTkwOTg3NjEzNC4xNzAxMzU0MTkw*_ga_QKMSDV5369*MTcxMjkyMzY4MC45Ni4xLjE3MTI5Mjg0NzAuNjAuMC4w).

There is no need to create an enterprise connection in that case.

Please take a look at the linked resources and let me know if there is anything you want to ask about 🙂

PS: with the second option, most likely users would have to reset their passwords, because as far as I know, AD uses a different than Auth0 function for [hashing passwords](https://auth0.com/blog/hashing-in-action-understanding-bcrypt/?_gl=1*1s3kodg*_gcl_au*MTk2ODgxMTkyNi4xNzA5MTMwMzE4*_ga*MTkwOTg3NjEzNC4xNzAxMzU0MTkw*_ga_QKMSDV5369*MTcxMjkyMzY4MC45Ni4xLjE3MTI5Mjg0NzAuNjAuMC4w) tus they can not be migrated.

---

<div class="post-metadata">

**Author:** ![srinivas2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@srinivas2](https://community.auth0.com/u/srinivas2)\
**Post date:** [April 17, 2024, 6:20am UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850/5 "2024-04-17T06:20:19Z")

</div>

@marcelina.barycka Thanks for your response.  
May be my question was not clear. I am not migrating users from AD to Auth0.  
My SaaS application uses Auth0 for Authentication. This application is being used by one of our client. They want SSO to this application from their AD instead of we creating new user ids for their users.  
For this they created an Application in their Azure with the application redirect url etc. I have created a Enterprise connection in Auto with their client is and secret and this is pointed to my SaaS application.  
When they login with their Azure id Auth0 is allowing them to login. My need here is that all their Users in Azure AD should be synced to our Auth0. So when a new user is added we dont need to add anything in our Auth0 but the user is automatically provisioned. (SCIM).  
Hope my requirement is clear now.

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [April 18, 2024, 9:11am UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850/6 "2024-04-18T09:11:55Z")

</div>

Thanks for specifying your use case @srinivas2 .

> [@srinivas2](#):
>
> When they login with their Azure id Auth0 is allowing them to login. My need here is that all their Users in Azure AD should be synced to our Auth0. So when a new user is added we dont need to add anything in our Auth0 but the user is automatically provisioned. (SCIM).

New users will be synced to Auth0 automatically during their first login to your application via the Azure enterprise connection. As far as I know, there is no periodical synchronization schedule between Azure and Auth0. It happens only when you log in to your app using an Azure connection.

To learn more about what user information will be provisioned during the login based on the connection type, feel free to take a look at this doc: [Choose a Connection Type for Azure AD](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/choose-a-connection-type-for-azure-ad)

Please let me know if you have any other questions about that.  
Thank you,  
Marcelina

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 2, 2024, 9:12am UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850/7 "2024-05-02T09:12:20Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [July 19, 2024, 6:16pm UTC](https://community.auth0.com/t/import-users-from-ad-to-auth0-for-sso/131850/8 "2024-07-19T18:16:39Z")

</div>

Hey there, everyone!

I’m excited to inform you about our [next Ask Me Anything session](https://community.auth0.com/t/discover-the-future-of-customer-identity-cloud-cic-powered-by-auth0-at-our-ask-me-anything-highlights-and-upcoming-features/138388) in the Forum on Tuesday, July 30, with the Product Management team. If you have questions about upcoming features like [FGA](https://auth0.com/fine-grained-authorization), [Manage Sessions in Actions](https://auth0.com/docs/manage-users/sessions/manage-sessions-actions), or [SCIM](https://simplecloud.info/). Submit your questions now, and our esteemed product experts will provide written answers on July 30. Can’t wait to see you there!  
[Learn more here!](https://community.auth0.com/t/discover-the-future-of-customer-identity-cloud-cic-powered-by-auth0-at-our-ask-me-anything-highlights-and-upcoming-features/138388/1)
