<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Azure on Nicola Suter</title><link>https://tech.nicolonsky.ch/tags/azure/</link><description>Recent content in Azure on Nicola Suter</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Nicola Suter</copyright><lastBuildDate>Thu, 10 Jan 2019 22:25:00 +0000</lastBuildDate><atom:link href="https://tech.nicolonsky.ch/tags/azure/rss.xml" rel="self" type="application/rss+xml"/><item><title>Clean up stale Azure AD devices</title><link>https://tech.nicolonsky.ch/clean-up-azure-ad-devices/</link><pubDate>Thu, 10 Jan 2019 22:25:00 +0000</pubDate><guid>https://tech.nicolonsky.ch/clean-up-azure-ad-devices/</guid><description>&lt;p&gt;If you are using Azure AD and the time passes you&amp;rsquo;ll have a lot of old device entries. If you enable the automatic device cleanup rule in Microsoft Intune the device is only removed within MDM and the Azure AD entry still exists.&lt;/p&gt;
&lt;figure class="kg-card kg-image-card kg-card-hascaption"&gt;&lt;img src="https://tech.nicolonsky.ch/content/images/2019/01/image-1.png" class="kg-image"&gt;&lt;figcaption&gt;Intune device cleanup rule&lt;/figcaption&gt;&lt;/figure&gt;
&lt;p&gt;For this reason I created a tiny PowerShell snippet to create a report with all devices which didn&amp;rsquo;t contact your Azure AD tenant since the treshold date specified. If you confirm the operation you can also delete all affected devices.&lt;/p&gt;
&lt;!--kg-card-begin: markdown--&gt;
&lt;p&gt;&lt;mark&gt;&lt;em&gt;Please be careful when running the script because when removing a device from Azure AD the stored Bitlocker recovery keys are also removed. I can recommend &lt;a href="http://rzander.azurewebsites.net/bitlocker-management-with-azure-storage-table/"&gt;Roger Zander&amp;rsquo;s Azure table-based Bitlocker recovery key solution&lt;/a&gt;.&lt;/em&gt;&lt;/mark&gt;&lt;/p&gt;
&lt;!--kg-card-end: markdown--&gt;&lt;!--kg-card-begin: markdown--&gt;&lt;script src="https://gist.github.com/nicolonsky/231844d2c383396331a94024bffbd7ff.js"&gt; &lt;/script&gt;&lt;!--kg-card-end: markdown--&gt;</description></item><item><title>Set Office 365 UsageLocation property with Azure automation</title><link>https://tech.nicolonsky.ch/office-usage-location-azure-automation/</link><pubDate>Wed, 09 Jan 2019 15:23:00 +0000</pubDate><guid>https://tech.nicolonsky.ch/office-usage-location-azure-automation/</guid><description>&lt;p&gt;If you want to assign Microsoft licenses to your Azure AD users e.g. Microsoft 365 E3 licenses you can do this with group based licensing as described &lt;a href="https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-licensing-whatis-azure-portal" target="_blank" rel="noreferrer"&gt;here&lt;/a&gt;. &lt;del&gt;The problem is that even with group based licensing the UsageLocation property for each user must be set individually.&lt;/del&gt;&lt;/p&gt;
&lt;p&gt;&lt;mark&gt;Update: 13.01.2019: Since group based licensing is GA the tenant location is used if no UsageLocation is set on a user object. Use this guide if you want to manually assign licenses or override the tenant settings if you need to configure different UsageLocations.&lt;/mark&gt;&lt;/p&gt;

&lt;h2 class="relative group"&gt;Possible bulk and automation solutions
 &lt;div id="possible-bulk-and-automation-solutions" 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="#possible-bulk-and-automation-solutions" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;You can achieve this with the following options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Manual&amp;rdquo; trough Azure or Office 365 portal&lt;/li&gt;
&lt;li&gt;PowerShell (must be triggered manually or through scheduled task)&lt;/li&gt;
&lt;li&gt;Azure AD Connect synchronisation (UsageLocation populated in on prem AD)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Azure automation with PowerShell runbook as in this post 🙂&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 class="relative group"&gt;Azure automation sounds expensive?
 &lt;div id="azure-automation-sounds-expensive" 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="#azure-automation-sounds-expensive" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h3&gt;
&lt;p&gt;Fortunately Azure automation offers 500 minutes of script runtime for free. Find more details under Automation pricing. Just to give you an idea: If the executed script has an average runtime of 1 minute you could run it (500 minutes / (30 calendear days / 1 minute script runtime)) = 16x per day. Each month. For free.&lt;/p&gt;</description></item></channel></rss>