How to export users from local domain to Azure AD

Sigmund karlsen 0 Reputation points
2023-05-10T07:59:53.9333333+00:00

Hello i'm fairly new at Azure AD and I was hoping that someone could help me with a few questions.

So I was wondering how I export about 5 users I have on a local domain to azure AD?

I basically want the users to move from the local one to cloud based and I want them to keep everything they had on the local one, that means files and programs.

I have a lab domain that I work on and when I connect the Domain with Azure AD the users from the local one is then added in azure active directory, but since it's the same username they automatically add 4 digit numbers on the user, I figured they do this to avoid conflict, but I want the users to keep using their original username..

How do I make the transfer from local to azure ad without losing any data or program. It might be an easy step, but I am stuck and hope that someone here can help me.

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Carlos Solís Salazar 18,191 Reputation points MVP Volunteer Moderator
    2023-05-18T06:06:38.95+00:00

    Thank you for asking this question on the Microsoft Q&A Platform.

    I'm really sorry for the delayed answer,

    You can use PowerShell to turn off directory synchronization and convert your synchronized users to cloud-only

    To turn off Directory synchronization:

    First, install the required software and connect to your Microsoft 365 subscription. For instructions, see Connect with the Microsoft Azure Active Directory Module for Windows PowerShell.

    Use Set-MsolDirSyncEnabled to disable directory synchronization:

    PowerShellCopy

    Set-MsolDirSyncEnabled -EnableDirSync $false
    

    Note: If you use this command, you must wait 72 hours before you can turn directory synchronization back on.

    Source: https://learn.microsoft.com/en-us/microsoft-365/enterprise/turn-off-directory-synchronization?view=o365-worldwide

    After the user become "Cloud-Only" you can remove your on-premises AD DS

    User's image

    Hope this helps!


    Accept Answer and Upvote, if any of the above helped, this thread can help others in the community looking for remediation for similar issues.

    NOTE: To answer you as quickly as possible, please mention me in your reply.


  2. Akshay-MSFT 17,951 Reputation points Microsoft Employee Moderator
    2023-06-13T05:00:36.5366667+00:00

    @Sigmund karlsen As mentioned in last comment "The problem we have is that I have user accounts both locally and in the cloud. This is seen as two different accounts" I would recommend to follow use UPN matching to match an on-premises user to a cloud identity.

    • Method 2: Use the Azure portal.
    1. Sign in to the Azure portal as a global admin.
    2. Select the Active Directory extension, and then select your directory.
    3. Go to the users management page.
    4. Find and then select the user.
    5. Note of the user name, which is the UPN.

    On a domain controller or a computer that has the Remote Server Administration Tools installed (RSAT), open Active Directory Users and Computers. Create a user account, or update an existing user account, by using a user name/UPN that matches the target user account in Azure AD. For more information, see Create a User Account in Active Directory Users and Computers.

    Force directory synchronization. For more information, see Force directory synchronization.

    Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.

    Thanks,

    Akshay Kaushik

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.