Conditional Access policy - allow from device

Merdzd 0 Reputation points
2025-03-20T16:21:59.3166667+00:00

hello .

I need to allow access for one user to the Power BI service, but only from a specific IP address and a group of devices registered in Azure. This means that a specific user can connect to the Power BI service only from a registered device in Azure and within a specific network (IP address).

However, while I can restrict access from unauthorized IP addresses, I am unable to block access from unregistered devices. It might be possible to create multiple rules, but I don’t see how this would work if both devices and users are managed within the same rule set.

User's image

User's image

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Raja Pothuraju 43,740 Reputation points Microsoft External Staff Moderator
    2025-03-20T17:55:16.1466667+00:00

    Hello @Merdzd,

    Based on your description, I understand that you want to allow access to the Power BI service only from a specific IP address and managed devices. If a user attempts to access it from a trusted location but an unmanaged device, access should be blocked.

    To achieve this, you need to use a device filter with the following expression:

    User's image

    If your users are using all these trusted device types (i.e; Microsoft Entra Joined, Entra Registered, Entra Hybrid Join), make sure to exclude these managed devices from the policy.

    Your policy should be like, Your policy should be configured as follows:

    • Users → Include all required users.
    • Target resources → Include the application you want to protect.
    • Network → Include "Any network or location" and exclude either "Selected networks and locations" or "All trusted networks and locations."
    • Conditions → Use Filter for Devices and exclude devices with the following rule syntax: device.trustType -eq "AzureAD"
    • Grant Controls → Select Block Access.
    • Click Save.

    This policy will block all access attempts from untrusted locations and unmanaged devices.

    If you need to exclude only one or two specific devices, use the deviceID property with the equal (eq) operator and enter the device ID value. Please refer to the screenshot below for reference.

    User's image

    I hope this information is helpful. Please feel free to reach out if you have any further questions.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  2. Marcin Policht 69,125 Reputation points MVP Volunteer Moderator
    2025-03-20T18:23:54.2233333+00:00

    Use the trustType property - as per https://learn.microsoft.com/en-us/entra/identity/conditional-access/concept-condition-filters-for-devices

    trustType Equals, NotEquals A valid registered state for devices. Supported values are: AzureAD (used for Microsoft Entra joined devices), ServerAD (used for Microsoft Entra hybrid joined devices), Workplace (used for Microsoft Entra registered devices) (device.trustType -eq "ServerAD")
    trustType Equals, NotEquals A valid registered state for devices. Supported values are: AzureAD (used for Microsoft Entra joined devices), ServerAD (used for Microsoft Entra hybrid joined devices), Workplace (used for Microsoft Entra registered devices) (device.trustType -eq "ServerAD")

    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


Your answer

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