Add Azure Unlicesned users to Dynamic group

Synthetic-Sentience 26 Reputation points
2021-05-19T18:17:07.79+00:00

Hi

I have a scenario where I am looking to filter out all Unlicensed Azure users.

I'm thinking if all the unlicensed Azure users are part of a group I could then enact actions against the group.

I could look to have this scripted but then I heard of dynamic groups and was wondering could I simply have all unlicensed users
auto added to that Dynamic Azure group ?

When looking at dynamic groups in the Azure GUI I seen standard AD fields but nothing such as an unlicensed user option.

Is this possible ?

Thanks

Microsoft Security | Microsoft Entra | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,261 Reputation points Microsoft Employee Moderator
    2021-05-19T21:03:04.643+00:00

    You should be able to use Microsoft Graph and filter by the assignedPlan capabilitySatus:

    (user.assignedPlans -all (assignedPlan.capabilityStatus -ne "Enabled")) -and (user.userType -eq "Member")  
    
    You and 1 other person found this answer helpful.
    0 comments No comments

  2. David Border 0 Reputation points
    2025-12-05T20:23:50.6133333+00:00

    The rule syntax in Marilee's post works perfectly if you want to exclude Guest users. To include Guest users in the unlicensed users group, just use the first part.

    (user.assignedPlans -all (assignedPlan.capabilityStatus -ne "Enabled"))
    
    0 comments No comments

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.