Avatar of Amal Nai
Amal NaiFlag for South Africa

asked on 

How to setup Intune BYOD migration automation?

Hello,


I am primarily trying to automate a process of moving user profiles on a device, which is connected to an on-prem AD, to Azure AD.

I have managed to try a number of things, however when trying to deploy a PPKG file to the device, it enrolls to MDM successfully and I am able to verify the device on Intune, but when running the "dsregcmd /status" command, it states that the device it not connected to MDM.

Doing this process manually works without any issues, but trying to automate this has given me so many headaches in the past week.


Any assistance or guidance will be appreciated.


Amal

Azure* MS Intune* Mobile Device Management (MDM)

Avatar of undefined
Last Comment
Amal Nai
Avatar of Hayes Jupe
Hayes Jupe
Flag of Australia image

but dsregcmd doesn't tell you if a device is connected to intune (MDM) - it gives you a status on its directory connectivity.

https://docs.microsoft.com/en-us/azure/active-directory/devices/troubleshoot-device-dsregcmd
Avatar of Jian An Lim
Jian An Lim
Flag of Australia image

to know whether your device is synced and managed by intune,
you need to run
if (get-childitem HKLM:\\Software\Microsoft\PolicyManager\Providers) {"working with intune"} else {"not working"}

or look for the intune agent installer location

if (get-childitem "C:\Program Files (x86)\Microsoft Intune Management Extension\") {"working with intune"} else {"not working"}

not perfect but you got something to baseline

Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

Hello Hayes and Jian,

Thank you very much for your replies.
Below is screenshots of what I'm facing:
User generated imageUser generated image
Please remember that the purpose of this expedition is to automate the process of migrating a user from on-prem AD to Azure AD. Regardless of if I'm on an AD or using a local user, I receive the same results. This is also not device specific, as I have tried the same process on multiple devices.
Even if I assign the device to a primary user, it also doesn't do anything.
Am I missing a step or doing this wrong?

Kind Regards
Amal
Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

Let me please clarify what I'm trying to do.

I want to add a PC to Azure AD.
As of this stage there is only 2 ways to do this, that I'm aware of:
1.   Manually using the “Connect” option in “Access work or school” in “Settings”.
2.   Using Windows Configuration Designer to create a PPKG file which you then run on the device to join it.

I don't want to do it manually to 600 users and using the PPKG file fails, hence my request for assistance.

Kind Regards
Amal
Avatar of Jian An Lim
Jian An Lim
Flag of Australia image

i need to understand what do you mean by "automate the process of migrating a user from on-prem AD to Azure AD "

User do not migrate from on-premises AD to azure AD, they are synced. i.e. account appeared in both on-premises AD and Azure AD.

that machine you provided is a workgroup machine,
AzureADJoined = False
EnterprisedJoin = false
Domainjoined = false

If it is intune (aka. compliant), mean you can use intune to manage it.
However, the user will stay EXACTLY the same. local user in your case. and will not able to logon using the Azure AD account.

If you intend to logon to the machine using your Azure AD user (email address and password), then your machine need in a state of
AzureADJoined = True
EnterprisedJoin = false
Domainjoined = false

That will require user to join it differently.

if you deploy the PPKG, that intend to be intune managed, thenthe screenshot did say it joined successfully. But it is not Azure AD Joined. 

ASKER CERTIFIED SOLUTION
Avatar of Jian An Lim
Jian An Lim
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

Yes I did follow that process.
When checking the Event Viewer, I notice the following errors:
User generated imageUser generated imageUser generated imageMaybe this leads to somewhere?
Avatar of Jian An Lim
Jian An Lim
Flag of Australia image

did you bulk token still valid?
Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

Yes it is.
It is newly created as of this morning.
Successfully signed and retrieved.
Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

This is so frustrating and weird.
I just re-tried to run the PPKG file and now it's working for some reason without any problems:
User generated imageI'm going to reset the device and re-create the scenario.
I'll keep you guys posted.
Avatar of Jian An Lim
Jian An Lim
Flag of Australia image

if you reset it, you need to delete the object in Azure AD as well.
don't leave it half hanging
Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

Thank you for that.
I will do.
Avatar of Amal Nai
Amal Nai
Flag of South Africa image

ASKER

@Jian An Lim, Thank you for your assistance in this matter.
Running the PPKG file again seems to have resolved it.

After tracing back my steps on what I did, it seems as though it was relating to a Device Configuration Profile that was incorrectly configured.
Upon testing why it wasn't working I deleted that, which seems to have fixed my problem.
I'm going to now re-create my config profile and see it's effects on the device enrollment.

Once again, I am very appreciative of your assistance.

Kind Regards
Amal
Azure
Azure

Microsoft Azure is a cloud computing platform and infrastructure for building, deploying and managing applications and services through datacenters. It provides both platform-as-a-service (PaaS) and infrastructure-as-a-service (IaaS) services and supports many different programming languages, tools and frameworks, including both Microsoft-specific and third-party software and systems. Cloud Services is a PaaS environment and can be used to create scalable applications and services; there are specific software development kits (SDKs) provided by Microsoft for Python, Java, Node.js and .NET. Azure also has file and storage services, data management, analytics and DNS services.

11K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo