Conditional Access Policy "Not Applied"

Felix 0 Reputation points
2025-02-19T11:21:26.02+00:00

Hi!

We got a Custom Application, which is called Tresorit
We want to block all sign ins which come from Mobile Devices

I created 2 Policys (Block & Allow)

Block Policy:

Users: Just me

Target resources: Tresorit

Conditions, Device platforms: Include "Any", Exclude: "Windows, macOS, Linux"
Grant: Block Access

Enable policy: ON

Allow Policy:

Same User and target Ressource

Condition, Device platforms: Include: Windows, macOS, Linux

Grant Access (Authentication strength)
Enable policy: ON

--
When logging in on iPhone / Mobile APP - Access is granted, which shouldn´t

The Log shows:

Where the Application ID is right (same as included in Policy)
Device info is iOS:

Browser Mobile Safari 18.3

Operating System Ios 18.3.1

Assignment shows "not Matched"

When I log in from macOS, logs are basically the same - But OS = macOS and the Allow Policy notices "Success"


The "What if" tools shows:

when device Platform is "iOS":
Policies that will apply:
Block access

when device Platform is "macOS or Windows":
Authentication strength (which is part of the "Allow policy")

The Policys seem to be configured correct - I cant figure out why mobile APP issn´t blocked

Any ideas are highly appreciated

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,713 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marcin Policht 39,370 Reputation points MVP
    2025-02-19T12:34:42.84+00:00

    Your Conditional Access policies seem well-structured, but there are a few potential reasons why the block policy isn't applying as expected when logging in from an iOS mobile app.

    1. Application might be using a different user-agent
      • The mobile app might not be reporting itself as an iOS device in the way Conditional Access expects.
      • Conditional Access policies primarily rely on user-agent strings to detect the device platform.
      • Since the log shows "Browser: Mobile Safari," it suggests that the authentication request is browser-based rather than coming from the Tresorit mobile app directly.

    To resolve it, instead of only filtering by device platform, try adding a condition based on the client app type.

    • Modify your block policy:
      • Under Conditions → Client apps, select "Browser" and "Mobile apps and desktop clients."
      • This ensures that both the browser and mobile app authentications are blocked.
    1. Modern vs. legacy authentication
      • If the mobile app is using legacy authentication (Basic Auth) instead of modern authentication, Conditional Access policies may not be able to evaluate it properly.
      • Check Sign-in logs → Authentication details to confirm whether the authentication is done using legacy or modern authentication.

    To resolve it, if legacy authentication is detected, enforce modern authentication and block legacy authentication protocols via Conditional Access.

    1. Policy evaluation order / overlapping policies
      • If there are other Conditional Access policies (besides the two you mentioned), they might be overriding or conflicting with your block policy.
      • Check if any higher-priority policies allow sign-in under different conditions.

    To resolve it, go to Entra Admin Center → Conditional Access and review all policies that might be affecting Tresorit.

    1. iOS devices enrolled in Intune (compliance policy conflicts)
      • If the mobile device is enrolled in Microsoft Intune, it could be marked as "Compliant" and be granted access due to another policy allowing compliant devices.

    To resolve it, check whether the device compliance status is affecting the access decision. If so, modify your block policy to also exclude compliant devices from access if needed.

    1. Session persistence / token caching
      • If you've previously logged in successfully from the iOS device, an active session or a refresh token may still be valid.
      • Sometimes, Conditional Access policies only apply to new authentication attempts, and existing sessions remain valid.

    To resolve it, in Entra Admin Center → Sign-in logs, check if the sign-in is using a refresh token instead of a new authentication. If refresh tokens are an issue, revoke all active sessions for the user via:
    - Entra ID → Users → Select user → Sign-in logs → Revoke sessions
    - Ask the user to sign out and log in again to test.


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


  2. Felix 0 Reputation points
    2025-02-27T16:49:54.19+00:00

    Thanks for the follow up.

    I don´t understand the logic here.

    In both cases (browser and mobile) the event is logged with same Application (Tresorit) and Ressource (Microsoft Graph) and User (Me)

    So the Signals for the Conditional Access Policy are the same but the login for the mobile app is "Not Applied"

    This behaviour looks odd to me - Because client app or any other signal issn´t part of the condition

    Targeting "All Cloud Apps" - is not suitable because I want to allow some Mobile APPs


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.