<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Azuread on Nicola Suter</title><link>https://nicolasuter.ch/tags/azuread/</link><description>Recent content in Azuread on Nicola Suter</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Nicola Suter</copyright><lastBuildDate>Tue, 08 Sep 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://nicolasuter.ch/tags/azuread/rss.xml" rel="self" type="application/rss+xml"/><item><title>Discover the Microsoft Graph API with the Microsoft Endpoint Manager Portal</title><link>https://nicolasuter.ch/discover-mem-graph-urls/</link><pubDate>Tue, 08 Sep 2020 00:00:00 +0000</pubDate><guid>https://nicolasuter.ch/discover-mem-graph-urls/</guid><description>&lt;p&gt;You always wanted to automate a specific action within Intune / the Microsoft Endpoint Manager Portal (MEM) but were afraid of the complexity? The Microsoft Graph API docs deliver you more questions instead of answers? Automating tasks within the MEM portal could be very easy, couldn&amp;rsquo;t it? I promise it will be much simpler with this magician trick.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Microsoft Endpoint Manager Portal
 &lt;div id="microsoft-endpoint-manager-portal" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#microsoft-endpoint-manager-portal" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The MEM Portal UI relies on the Microsoft Graph API. This means that the UI where you create new settings and policies and the Intune backend are encapsulated with different layers. Communication between the UI and the backend happens with the Microsoft Graph API. With the developer tools we can trace network traffic and discover the request URLs and request body payload which are required to interact with the API.&lt;/p&gt;
&lt;p&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="Architecture"
 src="https://nicolasuter.ch/content/images/2020/09/MEM-Portal-Automation.svg"
 &gt;&lt;/figure&gt;
{: .align-center}&lt;/p&gt;

&lt;h2 class="relative group"&gt;Example about how to capture URLs and build a PowerShell script
 &lt;div id="example-about-how-to-capture-urls-and-build-a-powershell-script" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#example-about-how-to-capture-urls-and-build-a-powershell-script" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
 &lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/k6ZCSJVXaOI?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
 &lt;/div&gt;

&lt;p&gt;Original request body:&lt;/p&gt;</description></item><item><title>Access has been blocked by Conditional Access policies when using device code flow</title><link>https://nicolasuter.ch/device-code-auth-ca/</link><pubDate>Thu, 03 Sep 2020 00:00:00 +0000</pubDate><guid>https://nicolasuter.ch/device-code-auth-ca/</guid><description>&lt;p&gt;When using device code authentication for PowerShell modules with conditional access you might receive prompts like: &amp;ldquo;&lt;code&gt;Access has been blocked by Conditional Access policies. The access policy does not allow token issuance&lt;/code&gt;&amp;rdquo; or &amp;ldquo;&lt;code&gt;AADSTS50097: Device authentication is required&lt;/code&gt;&amp;rdquo;. But what&amp;rsquo;s the reason for this error and is there a solution available?&lt;/p&gt;

&lt;h2 class="relative group"&gt;Examples from the field
 &lt;div id="examples-from-the-field" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#examples-from-the-field" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Device code flow is quite a convenient way to sign-in for an app within the web browser - at least if it works. If not you have to consider other options and that&amp;rsquo;s probably the reason why you&amp;rsquo;re reading this blog article.&lt;/p&gt;
&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="Device Code Auth"
 src="https://nicolasuter.ch/content/images/2020/09/device-code-auth-conditional-access.png"
 &gt;&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Az PowerShell&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Running the Az PowerShell module on PowerShell 7 uses device code flow to authenticate against your Azure tenant and might fail:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Connect-AzAccount: AADSTS50097: Device authentication is required.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Timestamp: 2020-08-17 13:36:31Z: Response status code does not indicate success: 401 (Unauthorized).&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The sign-in to Azure is tied to the &amp;ldquo;Microsoft Azure Management&amp;rdquo; app that you can select within Conditional Access.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Microsoft Graph PowerShell&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The same applies for the new Microsoft.Graph PowerShell modules - but here we receive a more detailed error message:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Connect-Graph: AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Timestamp: 2020-08-17 13:37:12Z&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The sign-in to the new Microsoft Graph Modules is tied to the &amp;ldquo;Microsoft Graph PowerShell (Preview)&amp;rdquo; app and some more apps I couldn&amp;rsquo;t determine.&lt;/p&gt;</description></item><item><title>Intune scope tags and role-based access control explained</title><link>https://nicolasuter.ch/intune-scope-tags-rbac-explained/</link><pubDate>Mon, 03 Aug 2020 00:00:00 +0000</pubDate><guid>https://nicolasuter.ch/intune-scope-tags-rbac-explained/</guid><description>&lt;p&gt;For larger Intune environments a solid role-based access implementation becomes crucial to ensure a secure administration. But how does Intune role-based access control (RBAC) work in combination with scope tags and how to get started? This post gets you covered with explanations and practical examples.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Role-based access control within the Microsoft 365 ecosystem
 &lt;div id="role-based-access-control-within-the-microsoft-365-ecosystem" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#role-based-access-control-within-the-microsoft-365-ecosystem" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;Within the Microsoft 365 ecosystem, Microsoft provides Azure AD administrative roles to administrate services like Exchange (Exchange administrator), SharePoint (SharePoint administrator), Intune (Intune administrator) and so on.&lt;/p&gt;
&lt;p&gt;As you can see Azure AD provides (usually) only one role which grants full administrative access over a service. You can configure more fine-grained controls within the service itself - that&amp;rsquo;s where the RBAC controls of the respective service kick in.&lt;/p&gt;
&lt;p&gt;To give you another example: You might have a 1&lt;sup&gt;st&lt;/sup&gt; or 2&lt;sup&gt;nd&lt;/sup&gt; level support department which needs permissions to perform remote actions on Intune managed devices. Instead of assigning them the Azure AD Intune Administrator role, it&amp;rsquo;s more convenient to assign them a fine-grained Intune RBAC role which delegates exactly the permissions needed.&lt;/p&gt;
&lt;p&gt;As the name already indicates Intune related roles only live within the Intune tenant and cannot be managed from AAD and vice-versa:&lt;/p&gt;</description></item><item><title>Azure AD guest user review solution</title><link>https://nicolasuter.ch/azure-ad-guest-user-review-solution/</link><pubDate>Tue, 14 Jul 2020 00:00:00 +0000</pubDate><guid>https://nicolasuter.ch/azure-ad-guest-user-review-solution/</guid><description>&lt;p&gt;Azure Active Directory guest users really simplify the process to collaborate with external users. Although keeping a good governance on guest accounts can become quite a challenge.
The two biggest challenges I often observe are: &lt;em&gt;&amp;ldquo;Who invited that guest user?&amp;rdquo;&lt;/em&gt; and &lt;em&gt;&amp;ldquo;Does this guest user still need access to our infrastructure?&amp;rdquo;&lt;/em&gt;. Inspired by a recent post of Thomas Kurth regarding &lt;a href="https://www.wpninjas.ch/2020/06/azure-ad-guest-account-governance-and-cleanup/" target="_blank" rel="noreferrer"&gt;Azure AD Guest Account - Governance and Cleanup&lt;/a&gt; I also developed a solution which comes quite close to an &amp;ldquo;Azure AD Access review&amp;rdquo; like user experience.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Notable features
 &lt;div id="notable-features" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#notable-features" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &amp;lsquo;Manager&amp;rsquo; attribute of your guest users get&amp;rsquo;s automatically populated with the identity of the inviter&lt;/li&gt;
&lt;li&gt;All Azure AD app registration information is stored in Azure Key Vault&lt;/li&gt;
&lt;li&gt;Almost zero touch deployment with ARM templates&lt;/li&gt;
&lt;li&gt;You can integrate existing guest users into this solution by populating the manager attribute in Azure AD&lt;/li&gt;
&lt;li&gt;You can configure the approval frequency for guest accounts&lt;/li&gt;
&lt;li&gt;Approval frequency respects last approval date for each guest account&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;Architecture
 &lt;div id="architecture" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#architecture" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://nicolasuter.ch/content/images/2020/07/AzureADGuestReview-AzScheme.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="Azure AD Guest User Review"
 src="https://nicolasuter.ch/content/images/2020/07/AzureADGuestReview-AzScheme.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The solution leverages function of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Azure Logic App&lt;/p&gt;</description></item><item><title>Who invited this Azure AD guest user?</title><link>https://nicolasuter.ch/who-invited-azure-ad-guest/</link><pubDate>Tue, 14 Jul 2020 00:00:00 +0000</pubDate><guid>https://nicolasuter.ch/who-invited-azure-ad-guest/</guid><description>&lt;p&gt;Who invited this Azure AD guest user? Examining who invited a specific a guest account can be quite a challenging question if you don&amp;rsquo;t have a log analytics workspace in place with Azure AD Audit log forwarding configured.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Kusto queries for your log analytics workspace
 &lt;div id="kusto-queries-for-your-log-analytics-workspace" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#kusto-queries-for-your-log-analytics-workspace" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The following queries help you to identify who invited a guest. If you haven&amp;rsquo;t set-up Azure AD audit log forwarding it&amp;rsquo;s the right time to do it now &lt;a href="https://nicolasuter.ch/conditional-access-and-azure-log-analytics-in-harmony/#forward-aad-logs-to-log-analytics" &gt;as described in one of my previous blogs&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To find all guest invitations:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="no"&gt;AuditLogs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt; &lt;span class="no"&gt;OperationName&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Invite external user&amp;#39;&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="no"&gt;Result&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;success&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;To find all accepted invitations:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-ruby" data-lang="ruby"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="no"&gt;AuditLogs&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt; &lt;span class="no"&gt;OperationName&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Invite external user&amp;#39;&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="no"&gt;Result&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;success&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kp"&gt;extend&lt;/span&gt; &lt;span class="no"&gt;InvitationId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tostring&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;AdditionalDetails&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;join&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; 	&lt;span class="no"&gt;AuditLogs&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;where&lt;/span&gt; &lt;span class="no"&gt;OperationName&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Redeem external user invite&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;	&lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;parse&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;regex&lt;/span&gt; &lt;span class="no"&gt;TargetResources&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;].&lt;/span&gt;&lt;span class="n"&gt;displayName&lt;/span&gt; &lt;span class="n"&gt;with&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;InvitationId: &amp;#34;&lt;/span&gt; &lt;span class="ss"&gt;InvitationId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="s2"&gt;&amp;#34;,&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="vg"&gt;$left&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InvitationId&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="vg"&gt;$right&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InvitationId&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;Improving your guest user governance
 &lt;div id="improving-your-guest-user-governance" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#improving-your-guest-user-governance" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;To simplify the guest user review and management process I developed a solution which fully automates this process. Additionally the solution populates the user who invited a guest as the guest&amp;rsquo;s manager which allows you to easily examine the question &lt;em&gt;&amp;ldquo;Who invited this Azure AD Guest Account?&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://nicolasuter.ch/azure-ad-guest-user-review-solution/" &gt;Azure AD guest user review solution&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Remove Azure AD direct License Assignments with PowerShell</title><link>https://nicolasuter.ch/remove-azure-ad-direct-license-assignments-with-powershell/</link><pubDate>Wed, 08 Jul 2020 00:00:00 +0000</pubDate><guid>https://nicolasuter.ch/remove-azure-ad-direct-license-assignments-with-powershell/</guid><description>&lt;p&gt;Who doesn&amp;rsquo;t love a clean and tidy environment, do you? This also applies for your license assignments in Office 365 and Azure AD. As time passess it is likely to have users with direct license assignments or users which still have old trial licenses assigned. To get rid of those assignments I created a PowerShell script with removal and reporting functionality.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nicolonsky/Techblog/tree/master/CleanupAzureADLicensing" target="_blank" rel="noreferrer"&gt;Direct link to the script&lt;/a&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Identify direct license assignments
 &lt;div id="identify-direct-license-assignments" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#identify-direct-license-assignments" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;In the Azure Portal we recognize direct license assignments on a user account by viewing the &amp;ldquo;Assignment Paths&amp;rdquo;:
&lt;a href="https://nicolasuter.ch/content/images/2020/07/Remove-Azure-AD-direct-License-Assignments-with-PowerShell-Portal-View.png" &gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="Azure AD Direct License Assignment Portal View"
 src="https://nicolasuter.ch/content/images/2020/07/Remove-Azure-AD-direct-License-Assignments-with-PowerShell-Portal-View.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With the MSOnline PowerShell module we can view the &lt;code&gt;Licenses&lt;/code&gt; property of a user and retrieve a nested property called: &lt;code&gt;GroupsAssigningLicense&lt;/code&gt;. The &lt;code&gt;GroupsAssigningLicense&lt;/code&gt; property contains either:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An empty array if the license was not inherited from a group -&amp;gt; direct assignment&lt;/li&gt;
&lt;li&gt;An array with objectId&amp;rsquo;s
&lt;ul&gt;
&lt;li&gt;If the array contains the user&amp;rsquo;s objectId -&amp;gt; direct assignment&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example 1: User with objectId &lt;code&gt;36c9b091-fe88-4dc2-a9e1-2662020b4bab&lt;/code&gt; has group based license assignment and direct assignment:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;AccountSkuId : nicolasuter:SPE_E5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;GroupsAssigningLicense : {0a918505-d0d5-4078-9891-0e8bec67cb65, 36c9b091-fe88-4dc2-a9e1-2662020b4bab}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Example 2: User has no inherited licenses from a group:&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;AccountSkuId : nicolasuter:SPE_E5
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;GroupsAssigningLicense : {}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 class="relative group"&gt;PowerShell Script
 &lt;div id="powershell-script" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#powershell-script" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;You find the PowerShell script &lt;a href="https://github.com/nicolonsky/Techblog/tree/master/CleanupAzureADLicensing" target="_blank" rel="noreferrer"&gt;on my techblog GitHub repository&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Automating network drive mapping configuration with Intune</title><link>https://nicolasuter.ch/next-level-network-drive-mapping-with-intune/</link><pubDate>Fri, 19 Jul 2019 07:32:46 +0000</pubDate><guid>https://nicolasuter.ch/next-level-network-drive-mapping-with-intune/</guid><description>&lt;p&gt;I&amp;rsquo;m thrilled to introduce the &lt;a href="https://intunedrivemapping.azurewebsites.net/DriveMapping" target="_blank" rel="noreferrer"&gt;intune-drive-mapping-generator&lt;/a&gt; which creates PowerShell scripts to map network drives with Intune. The tool is open source and built on ASP.NET Core MVC.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://intunedrivemapping.azurewebsites.net/DriveMapping" target="_blank" rel="noreferrer"&gt;&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="low"
 alt="intune-drivemapping-generator"
 src="https://nicolasuter.ch/content/images/2019/07/intune-drivemapping-generator.png"
 &gt;&lt;/figure&gt;
&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The intune-drive-mapping-generator is your tool of choice to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Generate an Intune PowerShell script to map network drives on Azure AD joined devices&lt;/li&gt;
&lt;li&gt;Seamlessly migrate existing network drive mapping group policies&lt;/li&gt;
&lt;li&gt;Generate a network drive mapping configuration from scratch&lt;/li&gt;
&lt;li&gt;Use an existing Active Directory group as a filter to deploy all your drive mapping configurations within one script&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;This all happens without scripting effort. You receive a fully functional PowerShell script for the deployment with Intune.&lt;/em&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Architecture
 &lt;div id="architecture" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#architecture" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;This tool is designed to work best with the following components although it can be useful for other purposes(?) :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Azure AD Joined and Intune enrolled Windows 10 devices&lt;/li&gt;
&lt;li&gt;Synced user account from Active Directory to Azure Active Directory (Azure AD Connect)&lt;/li&gt;
&lt;li&gt;On-premises file servers&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 class="relative group"&gt;Howto
 &lt;div id="howto" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#howto" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;

&lt;h3 class="relative group"&gt;Export existing group policy
 &lt;div id="export-existing-group-policy" class="anchor"&gt;&lt;/div&gt;
 
 &lt;span
 class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;
 &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#export-existing-group-policy" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;To convert your existing drive mapping group policy configuration, save the GPO as XML report with the group policy management console.&lt;/p&gt;</description></item></channel></rss>