<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Today I Learned (TIL) on Nicola Suter</title><link>https://nicolasuter.ch/categories/today-i-learned-til/</link><description>Recent content in Today I Learned (TIL) on Nicola Suter</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><copyright>© 2026 Nicola Suter</copyright><lastBuildDate>Thu, 04 Jun 2026 08:15:02 +0000</lastBuildDate><atom:link href="https://nicolasuter.ch/categories/today-i-learned-til/rss.xml" rel="self" type="application/rss+xml"/><item><title>Enhanced Filtering for Connectors: SPF failures in Defender for Office 365</title><link>https://nicolasuter.ch/til/mdo-enhanced-filtering/</link><pubDate>Thu, 04 Jun 2026 08:15:02 +0000</pubDate><guid>https://nicolasuter.ch/til/mdo-enhanced-filtering/</guid><description>&lt;p&gt;Enhanced Filtering for Connectors&lt;cite&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt; (aka skip listing) lets Exchange Online and Defender for Office 365 see the actual sender IP address instead of only the last hop. This is required so that MDO can verify message authentication attributes such as SPF, DMARC, and DKIM. Microsoft recommends it in its guides for third party mail flows&lt;cite&gt;&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt; &lt;cite&gt;&lt;sup id="fnref:3"&gt;&lt;a href="#fn:3" class="footnote-ref" role="doc-noteref"&gt;3&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt; to get the full value out of MDO.&lt;/p&gt;
&lt;p&gt;Without enhanced filtering, MDO only sees your 3rd party gateway as the sender for incoming e-mails. As a result, you lose important sender metadata, which degrades your experience in Threat Explorer, Advanced Hunting, and the Tenant Allow/Block List.&lt;/p&gt;
&lt;p&gt;The mail flow in the environment roughly looks like this, with the 3rd party gateway acting as the MX for inbound mail and as the smart host for outbound mail. Exchange Online is connected to an on-premises Exchange server via the hybrid connector:&lt;/p&gt;
&lt;pre class="not-prose mermaid"&gt;
flowchart LR
 Internet([Internet])
 Gateway[3rd Party&lt;br/&gt;Mail Gateway&lt;br/&gt;&lt;i&gt;MX record&lt;/i&gt;]
 EXO[Exchange Online&lt;br/&gt;&lt;i&gt;Defender for Office 365&lt;/i&gt;]
 OnPrem[On-Premises&lt;br/&gt;Exchange Server]

 %% Inbound flow
 Internet --&gt; Gateway
 Gateway -- "&lt;i&gt;Partner connector&lt;br/&gt;+ Enhanced Filtering&lt;/i&gt;" --&gt; EXO
 EXO -- "&lt;i&gt;Hybrid connector" --&gt; OnPrem

 %% Outbound flow
 OnPrem -. "&lt;i&gt;Hybrid connector&lt;br/&gt;+ Enhanced Filtering&lt;/i&gt;&lt;/i&gt;" .-&gt; EXO
 EXO -. "&lt;i&gt;Partner connector&lt;/i&gt;" .-&gt; Gateway
 Gateway .-&gt; Internet

 classDef cloud fill:#e6f2ff,stroke:#0078d4,color:#000
 classDef onprem fill:#fff4e6,stroke:#d97706,color:#000
 classDef gw fill:#f3e8ff,stroke:#7c3aed,color:#000
 class EXO cloud
 class OnPrem onprem
 class Gateway gw
&lt;/pre&gt;

&lt;p&gt;Following the Microsoft recommendation, enhanced filtering was enabled on both the 3rd party connector and the Exchange hybrid connectors.&lt;/p&gt;</description></item><item><title>Today I Learned</title><link>https://nicolasuter.ch/til/</link><pubDate>Thu, 04 Jun 2026 08:15:02 +0000</pubDate><guid>https://nicolasuter.ch/til/</guid><description>&lt;p&gt;A growing collection of bite-sized lessons from my day-to-day work. Quick tips, gotchas, and KQL snippets I want to remember and pass on. 🌱&lt;/p&gt;</description></item><item><title>Chasing Entra re-authentication prompts</title><link>https://nicolasuter.ch/til/entra-expiration-requirement/</link><pubDate>Mon, 01 Jun 2026 15:37:02 +0000</pubDate><guid>https://nicolasuter.ch/til/entra-expiration-requirement/</guid><description>&lt;p&gt;While troubleshooting unexpected re-authentication prompts in Entra ID, I stumbled over a legacy setting I had almost forgotten existed. The environment was piloting a new set of Conditional Access policies, and some pilot users received daily re-authentication prompts in Microsoft 365 apps, although no Conditional Access policy was forcing this.&lt;/p&gt;
&lt;p&gt;Entra ID Protection was the first suspect, but no risk detections were present for the affected users. The actual reason was hiding in plain sight in the Entra sign-in logs, in the &lt;code&gt;SessionLifetimePolicies&lt;/code&gt; field.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Inspecting SessionLifetimePolicies
 &lt;div id="inspecting-sessionlifetimepolicies" 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="#inspecting-sessionlifetimepolicies" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;A quick KQL query against &lt;code&gt;SigninLogs&lt;/code&gt; reveals every distinct &lt;code&gt;expirationRequirement&lt;/code&gt; reason observed in the tenant:&lt;/p&gt;
&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="ExpirationRequirement"
 width="627"
 height="148"
 src="https://nicolasuter.ch/til/entra-expiration-requirement/expirationrequirement.png"
 srcset="https://nicolasuter.ch/til/entra-expiration-requirement/expirationrequirement.png 800w, https://nicolasuter.ch/til/entra-expiration-requirement/expirationrequirement.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://nicolasuter.ch/til/entra-expiration-requirement/expirationrequirement.png"&gt;&lt;figcaption&gt;Distinct expirationRequirement reasons surfaced from SigninLogs&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class="highlight-wrapper"&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-kusto" data-lang="kusto"&gt;SigninLogs
| mv-expand parse_json(SessionLifetimePolicies)
| extend ExpirationRequirement = tostring(SessionLifetimePolicies.expirationRequirement)
| extend ExpirationDetail = tostring(SessionLifetimePolicies.detail)
| distinct ExpirationRequirement, ExpirationDetail&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;sessionLifetimePolicy&lt;/code&gt; resource is also documented as part of the Microsoft Graph API&lt;cite&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt;.&lt;/p&gt;

&lt;h2 class="relative group"&gt;Legacy MFA settings
 &lt;div id="legacy-mfa-settings" 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="#legacy-mfa-settings" aria-label="Anchor"&gt;#&lt;/a&gt;
 &lt;/span&gt;
 
&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;rememberMultifactorAuthenticationOnTrustedDevices&lt;/code&gt; value stood out and reminded me of the Azure AD days and the legacy MFA settings. Sure enough, the &lt;em&gt;Remember multi-factor authentication on trusted devices&lt;/em&gt; setting was still enabled:&lt;/p&gt;</description></item><item><title>Detecting Intune device compliance drift with KQL</title><link>https://nicolasuter.ch/til/intune-device-compliance-drift-kql/</link><pubDate>Tue, 26 May 2026 16:26:02 +0000</pubDate><guid>https://nicolasuter.ch/til/intune-device-compliance-drift-kql/</guid><description>&lt;p&gt;Why are my Intune devices no longer compliant? Rolling out new compliance policies, raising minimum OS versions, or adjusting other controls can all cause devices to drift out of compliance. Ultimately, this impacts resource access whenever Conditional Access enforces a compliant device.&lt;/p&gt;
&lt;p&gt;If you forward the &lt;code&gt;IntuneOperationalLogs&lt;/code&gt; to a Log Analytics workspace&lt;cite&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt;, you can query, parse, and alert on non-compliance events with just a few lines of KQL:&lt;/p&gt;
&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="Managed Device Not Compliant"
 width="1356"
 height="232"
 src="https://nicolasuter.ch/til/intune-device-compliance-drift-kql/query1_hu_73ea0739d283cb9e.png"
 srcset="https://nicolasuter.ch/til/intune-device-compliance-drift-kql/query1_hu_73ea0739d283cb9e.png 800w, https://nicolasuter.ch/til/intune-device-compliance-drift-kql/query1_hu_9e3091403bbe2d05.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://nicolasuter.ch/til/intune-device-compliance-drift-kql/query1.png"&gt;&lt;figcaption&gt;Anonymized example of noncompliant devices&lt;/figcaption&gt;&lt;/figure&gt;
&lt;div class="highlight-wrapper"&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-kusto" data-lang="kusto"&gt;IntuneOperationalLogs 
| where OperationName == &amp;#34;Compliance&amp;#34;
| extend Properties = parse_json(Properties)
| evaluate bag_unpack(Properties)
| where AlertType == @&amp;#34;Managed Device Not Compliant&amp;#34;
| extend UserPrincipalName = iif(UserDisplayName != &amp;#34;System account&amp;#34;, strcat(UserName, &amp;#39;@&amp;#39;, UPNSuffix), &amp;#34;System account&amp;#34;)
// Extract the reason
| extend ReasonRaw = tostring(split(Description, &amp;#39;||&amp;#39;)[0])
// Parse the compliance Policy ID
| parse ReasonRaw with ReasonParsed:string &amp;#34;_IID_&amp;#34; PolicyIdRaw:string
| extend Reason = coalesce(ReasonParsed, ReasonRaw)
| extend PolicyId = coalesce(PolicyIdRaw, &amp;#39;DefaultDeviceCompliancePolicy&amp;#39;)
| project-away *Raw
| project-reorder TimeGenerated, UserPrincipalName, DeviceHostName, IntuneDeviceId ,Reason, PolicyId&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="admonition relative overflow-hidden rounded-lg border-l-4 my-3 px-4 py-3 shadow-sm" data-type="note"&gt;
 &lt;div class="flex items-center gap-2 font-semibold text-inherit"&gt;
 &lt;div class="flex shrink-0 h-5 w-5 items-center justify-center text-lg"&gt;&lt;span class="relative block icon"&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"&gt;&lt;path fill="currentColor" d="M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c17.67 0 32 14.33 32 32c0 17.67-14.33 32-32 32S224 177.7 224 160C224 142.3 238.3 128 256 128zM296 384h-80C202.8 384 192 373.3 192 360s10.75-24 24-24h16v-64H224c-13.25 0-24-10.75-24-24S210.8 224 224 224h32c13.25 0 24 10.75 24 24v88h16c13.25 0 24 10.75 24 24S309.3 384 296 384z"/&gt;&lt;/svg&gt;
&lt;/span&gt;&lt;/div&gt;
 &lt;div class="grow"&gt;
 Note
 &lt;/div&gt;
 &lt;/div&gt;&lt;div class="admonition-content mt-3 text-base leading-relaxed text-inherit"&gt;&lt;p&gt;The &lt;code&gt;Properties&lt;/code&gt; column is a serialized JSON string that holds all the non-compliance details. The &lt;code&gt;bag_unpack&lt;/code&gt; plugin&lt;cite&gt;&lt;sup id="fnref:2"&gt;&lt;a href="#fn:2" class="footnote-ref" role="doc-noteref"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt; expands every property in the bag into its own column, which keeps the rest of the query much simpler.&lt;/p&gt;</description></item><item><title>Microsoft Authenticator App Details now exposed in Entra SignInLogs</title><link>https://nicolasuter.ch/til/authenticationappdevicedetails/</link><pubDate>Wed, 20 May 2026 12:00:01 +0000</pubDate><guid>https://nicolasuter.ch/til/authenticationappdevicedetails/</guid><description>&lt;p&gt;In response to CVE-2026-41615&lt;cite&gt;&lt;sup id="fnref:1"&gt;&lt;a href="#fn:1" class="footnote-ref" role="doc-noteref"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/cite&gt; (Microsoft Authenticator Information Disclosure Vulnerability), Microsoft started exposing the used Microsoft Authenticator app details as part of the Entra ID Sign-In Logs in the &lt;code&gt;AuthenticationAppDeviceDetails&lt;/code&gt; column. The information can be queried via KQL. Vulnerable builds include versions prior to 6.2605.2973 (Android) and 6.8.47 (iOS), which have been patched.&lt;/p&gt;
&lt;p&gt;You can use the below KQL query to find users with outdated Microsoft Authenticator app versions, which are vulnerable:&lt;/p&gt;
&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="AuthenticationAppDeviceDetails"
 width="872"
 height="213"
 src="https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDeviceDetails_hu_8cac35efb14eb6ad.png"
 srcset="https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDeviceDetails_hu_8cac35efb14eb6ad.png 800w, https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDeviceDetails.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDeviceDetails.png"&gt;&lt;/figure&gt;
&lt;div class="highlight-wrapper"&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-kusto" data-lang="kusto"&gt;// https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-41615
let MinimumVersions = datatable(
 AuthenticatorOperatingSystem: string,
 PatchedAuthenticatorVersion: string
)[
 &amp;#34;Android&amp;#34;, &amp;#34;6.2605.2973&amp;#34;,
 &amp;#34;Ios&amp;#34;, &amp;#34;6.8.47&amp;#34;
];
SigninLogs
| where isnotempty(AuthenticationAppDeviceDetails)
| extend AuthenticationAppDetails = parse_json(AuthenticationAppDeviceDetails)
| extend AuthenticatorOperatingSystem = tostring(AuthenticationAppDetails.operatingSystem)
| extend UsedAuthenticatorVersion = tostring(AuthenticationAppDetails.appVersion)
// b2b and guest accounts include: {&amp;#34;deviceId&amp;#34;:&amp;#34;{PII Removed}&amp;#34;} and no authenticator details
| where isnotempty(UsedAuthenticatorVersion)
| join kind=leftouter MinimumVersions on AuthenticatorOperatingSystem
| extend isVulnerable = parse_version(UsedAuthenticatorVersion) &amp;lt; parse_version(PatchedAuthenticatorVersion)
| where isVulnerable
| distinct UserPrincipalName, AuthenticatorOperatingSystem, UsedAuthenticatorVersion, isVulnerable&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;AuthenticationAppDeviceDetails&lt;/code&gt; (JSON) column itself consists of the following properties:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;appVersion&lt;/li&gt;
&lt;li&gt;clientApp&lt;/li&gt;
&lt;li&gt;deviceId&lt;/li&gt;
&lt;li&gt;operatingSystem&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code&gt;clientApp&lt;/code&gt; property is really helpful, as we now also have another option to identify users who use the Authenticator light capabilities, available as part of the Outlook app:&lt;/p&gt;
&lt;figure&gt;&lt;img
 class="my-0 rounded-md"
 loading="lazy"
 decoding="async"
 fetchpriority="auto"
 alt="AuthenticationAppDetailsClientApp"
 width="754"
 height="276"
 src="https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDetailsClientApp.png"
 srcset="https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDetailsClientApp.png 800w, https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDetailsClientApp.png 1280w"
 sizes="(min-width: 768px) 50vw, 65vw"
 data-zoom-src="https://nicolasuter.ch/til/authenticationappdevicedetails/AuthenticationAppDetailsClientApp.png"&gt;&lt;/figure&gt;
&lt;div class="highlight-wrapper"&gt;&lt;pre tabindex="0"&gt;&lt;code class="language-kusto" data-lang="kusto"&gt;SigninLogs
| where isnotempty(AuthenticationAppDeviceDetails)
| extend AuthenticationAppDetails = parse_json(AuthenticationAppDeviceDetails)
| extend AuthenticationAppDetailsClientApp = tostring(AuthenticationAppDetails.clientApp)
| where AuthenticationAppDetailsClientApp == &amp;#34;Outlook&amp;#34;
| distinct UserPrincipalName, AuthenticationAppDetailsClientApp&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This might be relevant in your environment if you did not disable the Microsoft-managed setting for using the Authenticator light option, which, for example, does not support Conditional Access authentication strengths, passkeys, and app protection policies:&lt;/p&gt;</description></item></channel></rss>