Menu
CCMEXEC.COM – Enterprise Mobility
  • Home
  • General
  • Configuration Manager
  • Windows 10
  • Intune
  • GitHub
  • Windows 11
  • About the author
CCMEXEC.COM – Enterprise Mobility

How to Use AzureDirectoryUserSync in ConfigMgr TP 1604

Posted on June 9, 2016August 25, 2017 by Jörgen Nilsson

Back in November at the MVP Summit we all where part of a Hackathon where all MVP’s submitted ideas for new features in Configuration Manager. Myself, Kim Oppalfens and Kaido Järvemets where part of a hackathon project that was either mine or Kim’s idea to start with, that can make it easier to do a proof of concept with mobile device management with Intune in Hybrid setup with Configuration Manager. To be able to use Intune in Hybrid with Configuration Manager the users that are allowed to enroll devices must be present in Configuration Manager and match the users in Azure AD which is why it normally requires AzureAD synchronization with AADConnect and matching UPN’s to be in-place before you can use it. To set that up to do a Proof-of-concept for instance can be a huge effort.

It also makes it really simple to setup Intune in a test environment with Technical preview of Configuration Manager. The result of that Hackathon project are now available in Configuration Manager technical preview 1604 and forward in the form of AzuredirectoryUserSync.exe which is located in the Configuration Manager install directory under Tools.

How do AzuredirectoryUserSync work then? It uses the Microsoft Graph API to read the user information from AzureAD and writes them to the Configuration Manager database so we can enroll devices in Intune/Configuration Manager to do a Proof of Concept or setup a test environment with technical preview of Configuration Manager without having to setup AADConnect and handle UPN challenges for instance. It takes 10 Minutes to setup an Intune subscription in Configuration Manager and import the users so you can start enrolling devices.

This is Great stuff!

So how do we do set it up then. To start with we need a Configuration Manager 1604 environment or later and an Intune trial.

  1. Create an Intune trial (http://aka.ms/intune)
  2. Log on to the office 365 portal and create a couple of test users (https://portal.office.com/AdminPortal/Home?switchtomoderndefault=true#/users)
    AzureSync1
  3. Log on to the O365 App Registration Tool (https://dev.office.com/app-registration)
    We use the account we created above for the Intune trial.
    AzureSync2
  4. Approve the permissions required for dev.office.com by pressing Accept
    AzureSync3
  5. Create an application with the following settings and permissions, this will grant the AzuredirectoryUserSync application permissions to read the user information from AzureAD. Select register App when done.
    Note that it must be exactly the settings displayed below.
    AzureSync5
  6. Copy the Client ID to clipboard and save it in a text file for use with the AzuredirectoryUserSync tool.
    AzureSync6
  7. On your Configuration Manager server open an elevated command prompt and run the following command. (Make sure that IE enhanced Security Configuration is not enabled, otherwise it will fail)
    AzureDirectoryUserSync.exe  -Tenant <tenant> -appClientId <appid> -redirecturi http://localhost:8000
    In my example that will be the following:
    AzureDirectoryUserSync.exe -Tenant CCMEXECTP5.onmicrosoft.com -appClientId d089f0bc-123b-4a96-a30f-a3375f3f1ca4 -RedirectURI http://localhost:8000
    You will be prompted to log in.
    AzureSync7
    And to accept the permissions needed for the SCCM AAD Sync application.
    AzureSync8 When the command finishes it looks like this with the numbers of users created in the last line.
    AzureSync9
  8. Launch the Configuration Manager console and you will now see the imported users there.
    AzureSync10
  9. We can now configure our Intune Subscription as we normally do and use these users to enroll devices.

This is really cool stuff and makes it so easy to do a Proof of Concept setup of Intune in Hybrid and to use the Technical Preview of Configuration Manager as well!

Note that the tool is in the technical preview which means it can change before release.

  • Configuration Manager
  • Configuration Manager TP
  • SCCM
  • Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    My name is Jörgen Nilsson and I work as a Senior Consultant at Onevinn in Malmö, Sweden. This is my blog where I will share tips and stuff for my own and everyone elses use on Enterprise Mobility and Windows related topics.
    All code is provided "AS-IS" with no warranties.

    Tweets by ccmexec

    Recent Posts

    • Windows Servicing, Personal Teams and Success.cmd
    • Windows MDM Security Baseline – Settings Catalog
    • Configuring MS Edge Security Baseline v107 using Settings Catalog
    • Configuring Desktop App Installer using CSP and script?!
    • Customizing Taskbar and Start in Windows 11 22h2 with PowerShell

    ©2023 CCMEXEC.COM – Enterprise Mobility | WordPress Theme by Superb Themes
    This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
    Privacy & Cookies Policy

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    SAVE & ACCEPT