Categories
Intune

RBAC in Intune- Who does what at the zoo

One thing that is important when working with IT infrastructure is to set the right level of permissions for the right people. Principle of least privilege is a good rule of thumb to follow, also in Microsoft Endpoint Manager.

It’s quite easy to just say that “okay, all admins gets the administrator role” which make everyone equal. But is it a good idea? No.

Microsoft Endpoint Manager (MEM) has a quite extensive Role Based Access Control (RBAC) function built in, and there are also Azure roles which applies to MEM. There is also the possibility to create your own custom roles if you want to define the roles yourself, or if you want to limit one of the built in.

Why use RBAC?

There is a simple answer to this. Improve security. Granting admin permissions to everyone administrating the system isn’t necessary. Your level of permissions should be related to what task you are performing. A Help Desk operator does not have the same needs as a third level support engineer; hence they should not have the same level of access.

Aiming for the principle of least privilege when looking at how to administrate MEM is important and implementing it at an early stage so that you assign roles accordingly.

For certain scenarios, there might be a need for users to have additional levels of access, being able to elevate Intune admin for example through Privileged Identity Management (PIM) but having a less privileged access as their normal level. Please note however, that PIM is an Azure AD P2 feature which you will need to make sure you are licensed for (it’s included in EMS and M365 E5 license SKU, but not in the E3 SKU).

Quick and dirty setup

So how to get going? One efficient way of doing it, which I like, is to firstly identify what roles you have in your organization and then map out what roles they should have. I prefer doing this in Excel, just listing the roles and then look at what Azure AD roles are related to MEM and then add the built in MEM roles. Then just simply add an X on who should have what roles. As you see in the example down below, some operational roles have several X in their row.

This should be adopted towards your organization and roles named what you are calling them.

Update: You can find my example Excel here.

Can I use PIM?

Using PIM, especially for admin roles should be a default when you are setting this up. You will need additional licenses, but you will not need this for all users only your admin users.

For Azure AD you can use PIM without any hassle, it’s easy to setup and you can set it to automatic approvals. Have look at this Microsoft Docs article on how to do it!

I would suggest having PIM for all roles which are called admin, so for MEM specific roles that is the Intune Administrator role and the Azure AD Joined Device Local Administrator role, but there are additional roles related to this area.

When it comes to using PIM on MEM specific roles, this isn’t as straight forward. You will need to take a different approach. PIM for Intune roles could be argued how beneficial this is, but it does improve security and resilience. However, you need to use a preview feature for this called Privileged Access Groups which is a part of PIM, and you will need to make sure to enable your Azure AD group for role assignment when creating it (this can’t be added creating the group). The people over at MSEndpointManager.com have create a great guide about how to set this up.

But in short what you need to do is to create a group which is enabled for Azure AD roles assignment.

Then enable Privileged Access on the group you created to add it to PIM.

Then you can assign your role in MEM to this group.

In this example I’m assigning PIM to my Help Desk Operator role.

Doing this, you could potentially enable PIM for all your MEM roles. I would however not use PIM for roles which are read only roles.

Key takeaway

There are a bunch of built-in roles in MEM which covers most scenarios. However, there might be instances where you need to tweak this a little bit. A good example of this is the Remote Help role which I wrote about in my previous post. Remote Help might be useful for people who are not working in Intune as part of their daily job, this could be application specific support personal for example who don’t need access in MEM but have the need to remotely support their users.

Getting RBAC in place at an early stage will simplify operations and getting the right permissions for everyone involved down the line, and you will decrease misshappenings. Or just simply shadow IT doing their own thing in your controlled environment without change control or the approvals from the governance forums.

Categories
Intune

Microsoft Remote Help tool

It finally happened. Microsoft released their own remote assistance tool called Remote Help at Ignite during the fall 2021. It was to be honest one of the things I got most excited about.

Licenses are still a bit unclear around this, Microsoft says it’s free to use during the preview but will come at an additional fee once GA hits. What this license model will look like, no one seems to really know at this point. So please be aware of that the licensing will change and that this is still public preview before putting this into production.

But the fact that it´s in public preview means that you can start assessing it and see if it will fulfil your needs!

The setup

To get going, you basically sign in to Microsoft Endpoint Manager, navigate to Tenant Administration > Connectors and Tokens > Remote Help and select Enable under the Settings tab.

And now it’s enabled!

You will also need to assign the correct rights to your support personal. If you are using the built in roles in Intune for this, this role is enabled by default for:

  • School administrator
  • Help Desk operator
  • Intune admin

If you want to add this role to a role, or create a specific custom role for Remote Help, you can do so by creating a new role and adding the Remote Help app” rights to that user.

You can create custom roles by going to Tenant administration > Roles and then select “+ Create“.

You will then have to assign your new role to an Azure AD group containing the users you want to add this role to by selecting Assignments on your newly created role and then “+ Assign”.

Give the assignment a name:

Add the group of users you want to assign this role to:

On the next blade you can select the scope for your support personal. You could for example only allow this group to remotely support a specific group of devices. But in this setup, I’m using “All devices” as the scope group.

If you are not using scope tags, just press next and then create your assignment.

Remote help app

The other part of this solution is the Remote Help app which you will need to distribute to your users.

To get the app, you simply download it from Microsoft at aka.ms/downloadremotehelp and you will get the application file.

Next step is to get this out to your computers through Intune, which means that you would need to package this as an Win32 app in Intune. Best way to do so is by using the IntuneWinAppUtil tool.

And create a detection rule based on that a file exist.

Once you have packaged it, uploaded it and distributed it to your clients, you are ready to go!

The experience

To connect, the admin or support personal needs to have the Remote Help app installed on their device (which should be deployed from Intune).

To launch a remote session with a user, there are two ways you can go at it. You as an admin can navigate to the device in the Microsoft Endpoint Management portal and go to Devices > Windows > Windows devices and find the device you want to support. On the device ribbon (where you see “Retire, Wipe, Delete”) find the three dots and select “New remote assistance session” and then click “Launch remote help”. This will open the Remote Help app.
Update: This being preview and all, it seems like the experience has changed a bit since when I originally started setting this up in my lab. The proper way to initiate a remote session is to go through the app, not Microsoft Intune. Check out the updated Docs for more information.

To initiate a remote session, launch the Remote Help app from your computer.

The first time you launch Remote Help, you will be asked to sign in and accept the user agreement.

Once signed in, you get a similar experience as the Quick Assist app where you can either choose to get or give help.

To give help, you simply select “Get a security code” which will generate a code that you can provide to the user you are helping.

When you have generated the code, share it the user you are helping. When the user enters the code in the “Get help” section, the admin will get a prompt showing which user they are trying to connect to, and they can select if they want to take full control or just view the screen.

Based on the support persons selection, the user will get a prompt showing who is going to help them and to allow or cancel their request to connect.

As you can see below, Remote Help will prompt if the device you are connecting to is not compliant and you can choose to either accept or leave the session since this could mean an increased risk. This status is also shown in the Microsoft Endpoint Manager portal on the device.

And now we can see the user’s desktop and perform our remote support tasks!

One little nice feature I found was that there is some options to do annotations on the users screen if you want to guide them to do something, and there is also a message feature you can send a receive messages in.

Why use Remote Help

What sets Remote Help apart from e.g. Quick Assist in Windows is that it’s built for enterprises, not consumer. This means that you have more control and possibilities, such as using corporate credentials and being able to accept UAC prompts with your admin credentials.

One other major thing here is that logging. You can see who helped whom and when.

You can also easily monitor how much the remote help is being utilized.

You can find all these things from Tenant Administration > Connectors and tokens > Remote Help (Preview).

Additional thoughts

I’m a huge fan of this new product and I’m really excited to see what this will become once general available.

One thing that could be a good idea is to remove the Quick Assist app if you have that installed on your device, to reduce confusion but also to improve security a little bit since with the Quick Assist anyone can remote your users’ computers if they are not cautious. This can easily be done by deploying a PowerShell script to the devices.

Remove-WindowsCapability -online -name App.Support.QuickAssist~~~~0.0.1.0

Quick Assist isn’t built for enterprise use but is a great tool to support family and loved ones to be honest (I use it often to support family members).

Categories
Intune Tips & Tricks

Exclude devices from profile

One of the most common ways to assign Windows Autopilot profiles is to use the wildcard argument for Autopilot devices in an dynamic Azure AD group:

device.devicePhysicalIds -any (_ -contains "[ZTDId]")

This is a powerful way of gathering all devices imported to Autopilot into a single group to assign either enrollment profiles, configuration profiles or even applications without the need for any additional work or use of group tags.

However, this group being powerful makes things a bit harder when it comes to excluding devices that might need a different enrollment profile for testing, different device type or just a different use case.

There are different ways of doing this, but this is the way I found that works well and it assumes that you have another Azure AD group which you use to assign Enrollment Profiles, dynamic or assigned.

Let’s say we have two enrollment profiles:

  • Production profile
  • HoloLens profile

The “Production profile” is assigned using a group called “All Autopilot devices” which gets devices using the “device.devicePhysicalIds -any (_ -contains “[ZTDId]”)” string to gather all devices which are imported to the environment.

We have also imported the HoloLens devices in to our device list for Autopilot, which we are using a group tag to populate our “HoloLens devices” group with which is then used to assign the HoloLens profile.

Now comes the tricky part. Since we have the “catch all” group already, that will include the HoloLens’s which means that we will assign configuration profiles and applications that are assigned using that group.

Since our HoloLens’s are a different type of devices, we want to assign a separate set of configuration profiles and applications towards them, meaning that we need to exclude them from the “All Autopilot devices” group and add them a HoloLens specific group to assign our HoloLens profile.

Creating out groups

To add them to the HoloLens deployment profile you can create a dynamic group which is using Group Tags to populate. This will require you to add this group tag to all your HoloLens’s. In this case, we will use the Group Tag “Hololens”.

(device.devicePhysicalIds -any _ -eq "[OrderID]:Hololens")

This will assign the HoloLens specific deployment profile to the device.

However, we also want to make sure that we do not include these devices in the bigger group which is used to assign the “regular” Windows policies. This was a bit trickier than I thought to be honest.

After playing around with excluding the group tag, which for some reason didn’t work that great, the most effective way was to exclude devices from my big “All Autopilot devices” group by using the fact that it has a deployment profile assigned to it. This value can be used in the rules for the group by saying that we don’t want to include devices having a deployment profiled called “Autopilot HoloLens” assigned to them.

device.enrollmentProfileName -ne "Autopilot HoloLens"

The outcome

By changing the rule to say that in addition to “catch all” also no include anything that has the deployment profile “Autopilot HoloLens” assigned to it, we will now have a group which will exclude all HoloLens devices!

This can of course be used for other things than HoloLens, it applies for anything that has a deployment profile assigned to it.

There are other ways to accomplish this, but this is the easiest way I’ve found so far!

Categories
Modern Workplace

Ignite reflections

Ignite 2021 Fall edition is over, and I honestly needed some time to process what was announced.

This year time there was quite a lot of things around device for once, but the general “Teams Teams Teams Teams” was gone and was more “MFA MFA MFA MFA” to quote a former colleague.

I think one of the bigger things with Ignite this time was not that there were a bunch of new cool things (even though that was awesome). The biggest thing was that you could start to see the synergies and relations between several products that has felt disconnected. It was no longer “yet another collaboration tool” when they announced Microsoft Loop, it integrates to existing things like Outlook or Teams. Microsoft Loops builds on the fluid framework which was introduced a while back and has now become something! That was my biggest take away this time, that now we are starting to see a more connected range of products again. This was referred to during Ignite as digital fabric, so a new cool buzz-word to use!

There was also some sweet news in the device management area, like a remote assistance tool from Microsoft (finally) and welcomed additions to Windows 365 like Azure AD Join.

In case you missed it, here is the Book of news containing all new cool things!

I’ve gathered a list of my highlights down below.

Device stuff

My top 5 from a device perspective:

I’ll also include a link to the summary of all things MEM related, you can find it here!

Microsoft 365 stuff

My top 5 from a Microsoft 365 perspective:

  • Microsoft Loop – The fluid framework has gotten a new name and practical application which integrates into other M365 services
  • Teams updates – It’s not Ignite without Teams updates. I think the coolest one was the Mesh support, but also Shared Channels which improved the experience when working with external parties
  • Updates to OneDrive – OneDrive for macOS will get an improved user experience and support for ARM. OneDrive will also get support for Universal Print
  • ClipChamp – Okay, this was a little outside the box, but Microsoft announced ClipChamp which is a new video editing app
  • Microsoft Viva – Microsoft Viva, which I found very interesting after the spring edition of Ignite, has reached General Availablity.

And of course, the overview for Microsoft 365 which you can find here!

Categories
Windows 365

CloudLAPS on CloudPC?

So I’ve been playing around a bit with Windows 365 Enterprise and thinking about “okay, what cool things should we try?”.

First step is of course to set it up and I thought about writing a guide about that. Halfway through my guide I realised that the one written by Christiaan Brinkhoff was far superior to mine, so go check his guide out!

One thing came to mind however, could you get CloudLaps to work on a Cloud PC?

Of course, we needed to try this even though I’m not a 100% sure that you need it.

What CloudLaps does it that it provides your PCs with a unique, randomized password for the local admin account on the machines which is rotated on a given interval (default is every 3 days). By using this functionality, all your PCs will have unique passwords for their local admin accounts meaning that if this is handed out to an end-user or support personal, the password will stop working when the password is updated.

The Cloud PC configuration

If you have not yet implemented CloudLaps, have a look at the guide in the link above, but if you have it in place, you are ready to go.

Since CloudLaps is built on proactive remediations in Microsoft Intune, you will need to make sure that the Cloud PCs are included in the assignment by using (or adding) a group containing all your Cloud PCs. Windows 365 Enterprise gives you the benefit that Cloud PCs are being automatically enrolled into Microsoft Intune which gives you the possibility to manage them directly without any further actions!

In this example, all the Cloud PCs are included in the same group as all other PCs since we want all these PCs to have the same settings. This was done by adding an extra rule to our Dynamic Group.

device.deviceModel -contains "Cloud PC Enterprise"

No additional configuration needed!

The outcome

The outcome of this test was as expected, worked perfectly fine!

A local admin password is populated in the CloudLaps portal, and I can use it on the machine to elevate my rights on the Cloud PC.

Since you can use the exact same configuration for Cloud PCs as physical PCs, you will not need to separate how you manage the Cloud PCs. They are just another PC, but in the cloud!

Categories
Modern Workplace Windows 365

Trying to understand Windows 365

You know, devices and new stuff are always fun. But what if you would provide a kick-ass, safe, Windows experience on any device without having to invest in infrastructure or administrative work? To semi-quote on of my all-time favourite TV-show: “Haaaave you met W365” (it’s supposed to be Ted, not W365).

Have You Met Ted GIFs | Tenor

I remember hearing about the new Windows Virtual Desktop at Ignite 2018 and thinking “Wow, this is sooo cool! Finally, someone simplified the complexity of VDI solutions a little!”

It was not perfect, but it had potential! Up until then Azure hadn’t really provided any good solutions for Windows 10 based clients. You could run Windows clients if you imported an image, but it was far from great. It was more for playing around with Windows.

Windows Virtual Desktop later became Azure Virtual Desktop, but it required a decent amount of work to set up initially. Don’t get me wrong, it’s super awesome given the flexibility it provides you could run anything on it. But it comes with a big challenge, especially if you are not familiar with VDIs. It requires a decent amount of configuration before you can get going. The Azure Virtual Desktop is however GREAT for scenarios where users don’t need a dedicated machine, their session can run in a host pool to make the most out of your Azure resources!

Windows 365 enters the stage

Microsoft announced Windows 365 during the summer 2021 (I remember noticing it during my summer vacation). I had a really hard time positioning this compared to the AVD solution, when should I pick what?

But finally, the coin dropped for me. Windows 365 is for when you just need a virtual computer with no super specific needs (since the configurations are a set list). Like for instance you have a consultant working in your company who already has their own device which they can run a Windows 365 machine on, instead of you having to source and ship a physical device.

Current sizing of Windows 365

It also has the quite nice feature of being simple to assign and setup since you assign a provisioning policy and a license to the end user, and you are good to go! This is truly VDI made for the masses if you ask me.

Of course, there are things you need to setup if you are running this in an enterprise, such as the network connectivity and on-premises domain connection (yes you sadly still need an on-premises AD and hybrid join for this in the enterprise setup, but AAD only is coming). You would also need to setup management profiles in Microsoft Intune or just reuse the ones you have for your physical machines. In Microsoft Intune, the Cloud PC is just a computer amongst all the others, but model will be Cloud PC instead of e.g. Surface Laptop.

Coming from a device management background, I also really love that you manage everything from the Microsoft Endpoint Management portal, no other fancy tools needed or a need to find your way around the Azure portal!

Who should use a Cloud PC?

So, who is the Windows 365 Cloud PC for really? Saying everyone is not the wrong answer, but when you face reality and leave the marketing slides behind, you will notice that most of your users don’t need this. But some absolutely do, and those are in this case the interesting users.

In the perfect of worlds, you could easily “only” have Cloud PCs and let your users use whatever device they want to access those. In an enterprise scenario, with a lot of history, which would not be feasible. At least not for your FTEs to start with unless you provide them with more lightweight devices and provide a beefier Cloud PC to do their work on.

In the scenarios I mostly have seen and discussed, there is one main use case we are discussing, and that is consultants who already has a computer (or device for that matter) and instead of providing them with a 5-year-old computer which got put in the spare pile you give them a virtual machine which they can access from their PC. This scenario is also valid for providing consultants with a more basic PC and “beef” it up using a powerful Cloud PC.

One thing I find useful is that you can run either Windows 10 or Windows 11 on it, you select the image yourself. This means that you could potentially have your physical machine on Windows 10 but run your virtual machine with Windows 11. This could be beneficial in a transition period from Windows 10 to 11 if you want to do some application testing without needing to re-install computers.

I’ll keep exploring Windows 365, and I’m really hoping Ignite will bring more cool stuff around for it!

Categories
Intune for noobs

Intune for noobs – Intro

I’ve been thinking about doing something more educational for a while now and I think this will be a great start to that. Writing a guide on how to setup your own Microsoft Intune lab. We will take shortcuts and do dirty tricks, just to get going. So please don’t use this as an implementation guide in a real environment. We will also skip all fancy steps as getting a real domain name and having an on-premises AD. But if you already have those in your lab, that’s great!

Here are the links to each part, and they are also published in the blog further down in the feed.

Sharing is caring, so my idea about this guide is to simply help you get started on your own Microsoft Intune journey and learn what it is and what it can do!

With this base, you can build further on your lab environment as you grow with the concept!

Enjoy!

Categories
Intune for noobs

Intune lab for noobs – part 1 // Pre reqs

I’ve been thinking about doing something more educational for a while now and I think this will be a great start to that. Writing a guide on how to setup your own Microsoft Intune lab. We will take shortcuts and do dirty tricks, just to get going. So please don’t use this as an implementation guide in a real environment. We will also skip all fancy steps as getting a real domain name and having an on-premises AD. But if you already have those in your lab, that’s great!

What do I need?

There are a few things you will need in order to get started:

  • An Azure AD tenant
  • Microsoft 365 or EMS licenses (E3 or E5)
  • Hyper-V or some other virtualization platform
  • A Windows image
  • A mobile device or two
  • A Google account
  • An Apple ID

There are more things, but this is a good start.

Getting a tenant

This can sound like the most cumbersome and expensive part, but it doesn’t have to be. Depending on your level of commitment, there are different ways to go at this. The Azure AD itself is free of charge, but you will need licenses to run Microsoft Intune. You could either buy these or get a test tenant for free from Microsoft. You can either get a one-month free trial from the Microsoft 365 info page which isn’t persistent if you don’t buy the license once it has expired. You can also sign up for a free trial of Microsoft Intune from Microsoft Docs, then enable a 90-day free trial of Enterprise Mobility + Security E5 if you go to Devices > Enroll Devices > Windows Enrollment > Automatic Enrollment. This will include everything you need to test Intune, but no Microsoft 365 services.

The best option is to sign up for the Microsoft 365 Developer program and get a tenant and licenses which will be renewed every 90 days if you sign in at least once.

My recommendation for your lab is to get the later one. You will want something that sticks around for more than 30 or 90 days.

By using the Microsoft 365 Developer program, you can also get sample data (users, generated emails, SharePoint sites) to make the environment more realistic with minimal effort.

The setup process is simple, you will need to register with Microsoft and then you will be able to create your tenant. Microsoft has a good step by step guide which you can find here!

Give your tenant a cool name (or just something you remember) and you are ready to go!

Once you have your tenant setup, use your admin account to sign in to endpoint.microsoft.com and BAAAM, you are now in the Intune portal!

Hyper-V or another virtualization platform

The reason we want a virtualization platform is to spin up some virtual test clients. There are numerous ways of doing this, but for small scale this is the simplest way.

If you are using a Windows based machine, you can enable in different ways. Easiest way is to simply run the PowerShell console as admin and run the following command (something I learned by writing this post):

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All

When the command is successful, reboot the machine.

If you are not comfortable with PowerShell, you can simply enable it in the “Turn Windows Features on or off” section of Programs and Features in the Settings app.

We will come back to how to use Hyper-V in a later section were we setup Windows management.

Getting a Windows image

There are a lot of different ways of getting a Windows image for testing purposes. If you have an MSDN/Visual Studio subscription, you can download this from your subscription repository of download. But if you don’t have that, the easiest way of getting a Windows image is to simply download it from Microsoft using the Media Creation Tool found here.

Once you have downloaded and started the tool, you can follow the on-screen wizard to obtain the image.

First, accept the terms and conditions page, then make sure to select “Create installation media”.

Select the language you require and make sure you get the 64-bit version (you don’t need 32 bit).

Select that you want this as an ISO-file

When you press next, it will ask you where you want to save the file and the download will start.

Mobile devices

Depending on what you want to do with your lab, I suggest you get at least one mobile phone. This could be any phone which is fairly up to date (iOS 12 and higher or Android 6.0 or higher).

For my lab, I’m using a cheap Samsung Galaxy A20 that I got on a sale which is running Android 10 and an iPhone X (which is my primary personal device). However, if possible, I strongly recommend using secondary devices for your lab, at least if you want the wipe features.

Google Account

Why do we need a Google account in the Microsoft world? It’s simply to activate and be able to use the Managed Google Play store and activate enterprise features. This can be a regular Google account; I’m using one that I’ve had for ages (in the real world make sure to use a dedicated which is NOT personal). If you already have a Gmail account, that will do just fine!

If you plan on sharing this environment with more people, use a dedicated account.

Apple ID

To enroll Apple devices in Microsoft Intune, we need to obtain a certificate from Apple. For that, we need an Apple ID.

Same goes here, for your personal lab you can use an already existing Apple ID which is not dedicated for the purpose (for real world use, setup a dedicated account). We will use this account later when we configure iOS/iPadOS management!

Ending notes…

And that’s about it for pre-reqs to setup your own Microsoft Intune lab!

In the next step, we will do some basic configuration of your brand-new Microsoft Intune tenant!

Categories
Intune for noobs

Intune lab for noobs – part 2 // The basics

This is part two of the series of building your own Microsoft Intune lab. We will take some shortcuts and do some dirty tricks, just to get going. So please don’t use this as an implementation guide in a real environment. We will also skip a lot of fancy steps as getting a real domain name and having an on-premise AD. But if you already have those in your lab, that’s great!

Setting up the basics

First step is to enter the magic world of Microsoft Intune, which you access from endpoint.microsoft.com. This is your go-to place for managing devices and you can also access the Azure Active Directory (Azure AD) from here.

The default landing page

To get you going, you will need a test-user and some groups, this is the first thing we will create.

In this part we will:

  • Enable MFA
  • Create users
  • Create groups
  • Enable Apple enrollment
  • Enable Google Android enrollment
  • Customize Company Portal

Enabling MFA

Security is important, even in a lab. I guess you are used to MFA by now, so let’s enable that for our lab tenant in the simplest way we can. It’s default enabled for your Global Admin account, but we need this for all accounts.

Depending on which way you got your license, this might or might not be available since it requires premium licenses for Azure AD.

Since there are a lot of better guides than I can ever write on this, this is how you do it in the most simple way: Enable per-user Multi-Factor Authentication – Azure Active Directory | Microsoft Docs

Creating a user

(If you already have users with assigned licenses, you can skip this part)

Simplest way to create a user is to click on Users in the left side menu and then just click “+ New user” in the top ribbon.

For this lab purpose, we will fill out the bare minimum which to set a user name, name and location (licenses needs location). Select to auto-generate the password and make sure to save it somewhere (OneNote is usually where I keep my lab information).

Next step is to assign a license to our new user. The easiset way to do this is to simply click on your newly created user and select “Licenses”.

Click on “+ Assignments” and then select the appropriate license you want to assign. Don’t forget to press save!

We now have a user which is allowed to enroll devices into Microsoft Intune!

Create groups

For this setup, we will create two groups. One user group and one Windows device group. You can of course create more groups, but to simplify we will start with these two!

To create a group, select Groups in the left side menu and then click “+ New group” in the ribbon.

For our user-group, we will keep it simple and set a name and use the “Dynamic User” as Membership type. Please note that this requires you to have a Azure AD P1/P2 license, if your trail does not come with that user “Assigned” as group type instead for the two groups we will create. This means that you will have to add the devices and users manually.

Next step is to create our rule by clicking “Add dynamic query” at the bottom. We will use a very simple rule which says to add all enabled accounts to the group.

This isn’t a good rule to use in real life, since we will also add all our admin users to this group. But for the sake of keeping things simple, this is good enough I would say.

Hit “Save” and then “Create“.

Next up is our Windows Autopilot group.

Same steps as previously, but this time select “Dynamic Device” as Membership type.

Next step is to create our rule by clicking “Add dynamic query” at the bottom. This time we will create a rule which will fetch all our Windows Autopilot devices.

Instead of manually entering the rules, click edit on the far right and add this string:

(device.devicePhysicalIDs -any (_ -contains "[ZTDId]"))

You will see that the property, operator and value is populated once you have added it.

Hit “Save” and then “Create“.

We have now created all the users and groups we need to get going but you can of course build on this and create even more groups and users to your liking.

Enable enrollment

As default, Windows enrollment is always enabled. For iOS, iPadOS, macOS and Android we will need to add some connectors to enable management.

Apple devices

To setup Apple enrollment, we need an Apple ID to request a certificate from Apple. For your lab (if you are the only one using it) you can use the Apple account you already have.

Select Devices in the left side menu, then select Enroll devices, then Apple enrollment. You will notice that all except one options is grayed out since we are missing the Apple MDM Push certificate which enables all the services

Select the “Apple MDM Push certificate” option and you will be asked to grant Microsoft permission to send information to Apple by checking the box. Secondly, download the CSR and save it somewhere on your computer.

Next step is to click the “Create your MDM push certificate” and you will be asked to sign in with your Apple ID to the Apple certificate portal.

As you can see, I have quite the few certificates from different previous labs (and my current one). Your list will most likely be empty.

Select “Create a Certificate” and accept the terms of use and on the next page upload the CSR file you downloaded previously. I’m also adding a comment for myself that this is for the Intune for Noobs environment. Then click “Upload“.

Once the CSR is uploaded, an Apple MDM Push certificate will be issued with an expiration date 1 year into the future. Intune will warn you once you are getting close to the renewal date.

Download the certificate to your computer and save it, then head back to the Microsoft Intune portal and enter the email adress of your Apple ID on step 4 then upload the certificate you just downloaded. Then click “Upload” and you have successfully enabled management of Apple devices and you can close the flyout with the X in the upper right corner to end up back on the “Enroll devices” page.

Google Android

To enable the modern management methods of Android called Android Enterprise, you will need to link a Google account to the Managed Google Play.

Select “Android Management” in the list and you will notice the same thing here, that all options under Android Enterprise is grayed out except to connect the Managed Google Play.

Click the “Managed Google Play” option and flyout will appear. Grant Microsoft premissions to send information to Google, then click “Launch Google to connect now“. A pop-up will appear asking you to sign-in to Google. If you don’t have a Google account you want to use, or want to create on for the purpose of this lab you can select to create an account to manage your organization with. Otherwise use an existing Google account.

Once you have signed in, click “Get started” on the landing page displayed.

Next step is to add your business name (this could be whatever). I’ve named mine the same as in the Microsoft world.

On the next step, you are asked to fill out some contact information, you can skip this and just check the box at the end. Then finish the wizard.

Once done and you have selected to finish the setup, you will be redirected back to Intune, and you will see that the service is active.

Customize Company Portal

Last thing we will do is to add some customization to Company Portal but also the sign-in experience (which we will use in Windows Autopilot).

First off, select “All services” in the left side menu and then select “M365 Azure Active Directory“. A new tab will open and select “Azure Active Directory” in the left side menu. Then navigate to “Company Branding” in the list. Select “Configure” to get started. You can add a lot of custom backgrounds and logos, but for now we will only enable “Show option to remain signed in” at the bottom and click save to keep it super simple. You can come back here later and add your custom things.

Click save and then close the Azure AD portal and head back to Microsoft Intune.

In Microsoft Intune, select “Tenant administration” in the left side menu, then navigate to “Customization“. This is where you call add customizations to the Company Portal app, which is the end-user side of Microsoft Intune and the portal where users get applications and information.

To edit the settings for the portal, click Edit at the top of the page (next to Settings).

To keep things simple, we will only add the required information to this, but you can come back later and add more.

I’ll add my company name, and leave the rest of the branding part to default.

Further down under Configuration I will add a URL to my “Privacy statement”. In this case it’s just the URL to my blog. You need to add something and it’s a good idea to choose something that exists so you can try the link when playing around in the company portal

Once you have added those two, click “Review + save” and then “Save“.

Ending notes…

We have now prepared our Microsoft Intune environment to start doing some real stuff. In the next part we will setup some really simple management of Windows including enrollment through Windows Autopilot.

Categories
Intune for noobs

Intune lab for noobs – part 3 // Windows

This is the third part of the series of building your own Microsoft Intune lab. We will take some shortcuts and do some dirty tricks, just to get going. So please don’t use this as an implementation guide in a real environment. We will also skip a lot of fancy steps as getting a real domain name and having an on-premises AD. But if you already have those in your lab, that’s great!

Windows management

As I stated in the previous part, Windows management is enabled by default. However, there is one you will need to enable which is Automatic Enrollment. This requires and Azure AD Premium license which is included in the EMS and M365 Dev setup.

To enable this, select Devices in the left side menu. Then navigate to Windows, then Windows Enrollment. Select the “Automatic Enrollment” option.

Make sure to set the “MDM user scope” to All then click save. You can leave everything else set to default.

That’s about it! We are now ready to start setting things up for your lab!

Guided scenarios

As I said, we will take some shortcuts in this tutorial to get you going, therefor we will use the Guided Scenarios found on the landing page of Microsoft Intune (just click Home in the left side menu).

Click start under “Deploy Windows 10 and later in cloud configuration” and the wizard for setting up a basic Windows Autopilot configuration will kick-off.

On the first screen, read through the information and then click Next.

On the Basics tab, leave “Apply device name template” set to default, but add a Resource Name Prefix such as Win10 to help you visually identify that this is for Windows. Then click Next.

On the Apps tab, leave everything to default, this will install Microsoft Teams and Microsoft Edge, but not the full M365 Apps suite (this can be added later on if needed). Click Next.

Since we already created a device group, select “Choose an existing group” and add the device group you created earlier. Click Next.

On the last page you will be able to review your settings under “Configurations to be made“. When you are happy with your options, select “Deploy” and wait for the process to finish.

You have now taken a real shortcut to get going with basic settings for your Windows devices.

You can of course build further on this, but as part of this tutorial we will leave it at this.

Preparing a Windows device

So next step is to prepare your Windows device for Windows Autopilot. The easiest way to do this to export the Hardware ID using PowerShell. Don’t be alarmed, you don’t need to be a code monkey or script kiddie to run this, it’s rows that you need.

Depending on what state your device is in, you can either run this from an elevated PowerShell prompt when you are in a Windows session which is up and running. In my example down below, I will run this from a Virtual Machine in Hyper-V during the OOBE setup. To create a Windows 10 VM in Hyper-V, you can follow this guide from Microsoft.

If you are using Hyper-V, make sure to enable the TPM feature in Settings on the virtual machine. We will need this for Bitlocker.

Once you reach the start of the OOBE, stop at selecting language.

Press SHIFT and F10 (you might need FN as well depending on your keyboard) to launch a command prompt. Then type powershell and hit enter to start PowerShell.

Next, we will run three lines of PowerShell commands. You can find more information about it on Microsoft Docs.

Install-Script -name Get-WindowsAutopilotInfo -Force
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
Get-WindowsAutoPilotInfo -Online

Run the lines in the PowerShell windows. You can copy-paste by going to Clipboard > Type Clipboard text in the Hyper-V session.

You will be asked to press Y for yes a few times during the process to install the script.

When you have ran the “Get-WindowsAutoPilotInfo -Online” line, it will install a few modules and then you will be asked to sign in using your Microsoft account. Use the account you have signed into Intune with (it has the required access as Global Admin, but a user with the Intune Admin role will be sufficient in the long run).

When you run this the first time you will be asked for consent for using this, scroll down and press Accept.

Once you have accepted, the process of gathering the Hardware ID will start automatically, but don’t close the session until it has finished. This will take up to a few minutes. Once you can confirm that the script has finished successfully, turn of the computer or reset Windows if you are doing this from an already up and running Windows client (you will lose all data).

Head back over to Microsoft Intune to confirm that the computer was successfully imported by navigating to Devices > Windows > Windows Enrollment and select Devices.

This is the section where all your imported Windows Autopilot devices will be listed, and you can see if a Deployment profile has been assigned to the device.

Once the Deployment profile has been a assigned to the device, you will see that the Profile status is set to “Assigned“. This usually takes about 10-15 minutes and you can’t do more than just wait. If you click on the machine you can see some more information, such as what profile is assigned.

Enroll your device

Now it’s just the fun part left. Enroll your device!

Just simply start your computer or virtual machine again and follow in the on-screen instructions. Once you have selected language, keyboard locale and network (if physical device) you will end up on a screen saying, “Welcome to [your company name]” and you will be asked to sign in.

Sign in using the account we created earlier and just follow the flow. If this is the first time you sign in with this user, you will be asked to setup MFA and change the password.

The enrollment typically takes between 20-30 minutes depending on how many applications are being assigned. You can follow the progress on the screen. You can expand each section to track progress.

At one point in the process, you will be asked to sign in again, this is to set the user affinity and configure the “Account setup“.

Ending notes

We have now successfully setup an extremely basic Windows configuration that you can play around with. If you go to Devices > Windows > Windows Devices you will see all your enrolled devices and information about them. You can also perform remote actions on them, which I encourage to try!

Since this is an isolated lab environment, try stuff out. You can’t really break anything and worst-case scenario you will have to re-install the Windows client.

Play around. Have fun.

In the next part we will dig into iOS management!