Merillβs blog
Device filter > Device platform
When designing a conditional access policy and have the choice between using device filter and device platform always use device filter.
The catch is that device filter can only be applied to managed or hybrid joined devices.
Itβs a limitation since you canβt use it with unmanaged devices, but that is exactly the reason why it is better to use it over device platform when your CA policy is targeting managed devices.
The device platform relies on the user agent string which can be easily spoofed. Nicola has a good write up on this over at Bypassing Conditional Access Device Platform Policies
Share on
TwitterWhat I use
Iβm frequently asked about the apps I use. So hereβs a list for future reference so I can avoid repeating myself π
Notes
Visual
Social
Other
Share on
TwitterAzure AD multi-tenant app vs single tenant app
Iβve recently noticed that Azure AD admins are being asked to create multi-tenant apps in their corporate tenant.
In some instances, it was the devs in the org asking for this, in other instances it was the application vendor.
Here are some things to watch out for π
Multi-tenant apps are meant for ISVs and SaaS vendors to create an instance of an app in βtheir own tenantβ. Examples of such apps are ServiceNow and SalesForce.
When an app is created as a multi-tenant app, ANY user from ANY Azure AD tenant can visit the appβs url and sign in.
If you create a multi-tenant app in your corporate tenant and apply a conditional access policy. The policy only applies to users and guests in your tenant.
β οΈ Iβll repeat β your CA policies do not apply to users signing into your multi-tenant app in their own tenant.
So, what is the general rule of thumb that Azure AD admins and cybersecurity teams should follow?
If the app is from a vendor/SaaS provider:
β Add the app to your tenant from the Azure AD Application Gallery
β If the app is not in the gallery, you as the customer can request the vendor to get their app listed on the Azure AD app gallery
β If app gallery is not an option, request the vendor to create the app in their own tenant. Use the admin consent model to add the app to your tenant.
β If the only option provided by the vendor is to create the app in your tenant, push for the vendor to allow you to create a single tenant app.
If the app is developed by devs in your org and is only meant for users in your own org.
β Ask why the dev needs this to be a multi-tenant app?
β Ask if the devs have implemented appropriate checks to prevent sign-ins from other tenants.
There are many valid scenarios for creating multi-tenant apps in your tenant, including
β You are a SaaS vendor or ISV and you create and publish apps that Azure AD customers can consume
β You manage multiple Azure AD tenants in your org and you need a single service principle (workload identity) to access the other tenants (e.g. automate DevOps tasks across your tenants)
Here are some further reading on the topic of multi-tenancy. These are meant for devs however its good reading for admins to appreciate what it takes to build a least-privilege multitenant app.
π https://learn.microsoft.com/en-us/azure/architecture/multitenant-identity/
Note: This MSRC blog post provides additional guidance on how you can review the multi-tenant apps in your tenant and switch them to a single tenant app if multi-tenant is not a requirement.
Share on
TwitterUse a custom app for Graph PowerShell delegate access
If you want to follow the least privilege model for the applications in your Azure AD tenant, you might be concerned about consenting to many permissions scopes to the Microsoft Graph PowerShell app over time.
To avoid this, you can register your own app for use with Microsoft Graph PowerShell. This allows you to have more granular control.
Here are the steps to go about setting it up.
- Browse to Entra > App registrations [adappreg.cmd.ms] > New Registration
- Name: Microsoft Graph PowerShell - High Privilege admin use only (<- Give a meaningful name)
- Account type: Accounts in this organization directory
- Redirect URI:
- Select Public client/native from the drop down
- Uri: http
://localhost
- Click Create
Thatβs it!
Now you can use this app instead of the default one by connecting with
Connect-MgGraph -ClientId <Your new app clientid> -TenantId <your tenant id>
Here are a few screenshots to help guide you.
Remember to use the ClientId and TenantId parameters when signing in.
Restricted user access
I would also recommend limiting the users that have access to these Graph PowerShell applications. To do this browse to the Enterprise Applications [adapps.cmd.ms](https://adapps.cmd.ms] blade, select the app and in Properties set Assignment required? to Yes. Then grant access to the required folks from the Users blade.
Windows PowerShell 5.1
The steps above will get you working with PowerShell 7, which is what you SHOULD be using. In the unfortunate event that you are stuck with Windows PowerShell 5.1 you need to do one more thing.
- Open the app you just created in App registrations [adappreg.cmd.ms]
- Select Authentication
- Check https://login.microsoftonline.com/common/oauth2/nativeclient
- Click Save
Share on
TwitterAzure AD and Microsoft Graph Extensions and Attributes
A comparison of the five different types of Microsoft Azure AD + Graph extensions and attributes.
Β | Extension Attributes 1-15 (aka onPremisesExtensionAttributes) | Directory extensions / Custom extension properties (aka AAD extensions) | Schema extensions | Open extensions | Custom security attributes |
---|---|---|---|---|---|
Audience | IT Admins β’ Devs | IT Admins β’ Devs | Devs | Devs | IT Admins β’ Devs |
Dynamic group membership rule | β | β | β | β | β |
Conditional Access - Users and groups | β | β | β | β | β |
Conditional Access - App Filter | β | β | β | β | β |
Conditional Access - Device Filter | β | β | β | β | β |
Admin user interface | β | β | β | β | β |
Cross-Tenant synchronization | β | β | β | β | β |
App user provisioning | β | β | β | β | β |
Entitlement Management automatic assignment | β | β | β | β | β |
Lifecycle Workflows execution conditions scope | β | β | β | β | β |
Filterable | β | β | β | β | β |
External identities - Self-service sign up flow | β | β | β | β | β |
Usable for customizing token claims | β | β | β | β | β |
Requires AAD P1/P2 license | β | β | β | β | β |
Azure ABAC | β | β | β | β | β |
Block read access | β | β | β | β | β |
Strongly typed | β | β | β | β | β |
Support multi-valued attributes | β | β 1 | β | β | β |
Azure AD Connect and Cloud Sync | β | β | β | β | β |
Supported resources | user β’ device | user β’ group β’ administrativeUnit β’ application β’ device β’ organization | user β’ group β’ administrativeUnit β’ application β’ contact β’ device β’ event β’ message β’ organization β’ post | user β’ group β’ contact β’ device β’ event β’ message β’ organization β’ post β’ todoTask β’ todoTaskList | user β’ servicePrincipal |
Data types | String | Binary β’ Boolean β’ DateTime β’ Integer β’ LargeInteger β’ String (256 char) | Binary β’ Boolean β’ DateTime β’ Integer β’ String | String | Boolean β’ Integer β’ String |
Max limits | 15 per object | 100 extensions across all types and all applications | 100 per resource | 2 per creator app per resource | 50 per object β’ 500 attributes per tenant β’ More info |
When to use | β’ Simpler way to leverage on-prem data or Exchange data β’ Wanting a simple string attribute on a user/device which can be used in multiple applications as a claim |
β’ Extending AAD resources with more attributes β’ Need more strongly-typed attributes than extension attributes 1-15 β’ With AAD Connect Sync, can also sync on-prem or SharePoint data |
β’ To extend Graph resources β’ Donβt require attributes as part of user authentication and as a claim |
Directly add attributes to single Graph object, rather than through an extension schema | Store confidential data |
Key notes | β’ Can only sync for users with onPremisesSyncEnabled β’ Cannot be updated by Microsoft Graph unless users/devices are cloud only (not synced from on-prem) |
β’ Extension is created on an app object, then target resource(s) are manually updated with value β’ AAD Connect Sync uses directory extensions |
Extension is created as stand-alone resource, then applied to object | Simple setup and usage | Built with security and least privilege |
1 Multi-value support in directory extensions is limited to attributes synchronized from on-prem. It is not possible to create new multi-valued directory extensions in Azure AD.