Intunes - Creation of dynamic group

David B 41 Reputation points
2022-06-15T08:24:25.417+00:00

Hi,
I would like to create a device dynamic group on Intunes with two requirements:
-the device name contains "device-"
-the device belong to intunes group

Intunes give me this rule syntax:
(device.displayName -contains "device-") and (device.objectId -eq "xxx-xxx-xxx-xxx-xxx")

(device.displayName -contains "device-") → OK, the rules matchs
(device.objectId -eq "xxx-xxx-xxx-xxx-xxx") → KO. I have indicated the objectId of my intunes group but I think that it is the property "device.objectId" that is not good.

Is there an alternative of "device.objectId" for groups?

I have consulted https://learn.microsoft.com/fr-fr/azure/active-directory/enterprise-users/groups-dynamic-membership but I have not found an answer.

Thank you
David

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

3 answers

Sort by: Most helpful
  1. Anoop C Nair MVP Enterprise Mobility 21 Reputation points MVP
    2022-06-24T04:11:34.323+00:00

    HI @David B - I think this is expected behavior for the preview nested group scenario.

    Preview limitations of nested AAD groups - MemberOf can't be used with other rules. For example, a rule that states dynamic group A should contain members of group B and also should contain only users located in Redmond will fail.

    I have noted this in the post as well -> https://www.anoopcnair.com/how-to-create-nested-azure-ad-dynamic-groups/

    KR
    Anoop

    1 person found this answer helpful.
    0 comments No comments

  2. Rahul Jindal [MVP] 10,911 Reputation points MVP
    2022-06-15T16:56:38.04+00:00

    I think you need to use device.memberof -any (group.objectId -in ['value']) instead.


  3. Limitless Technology 39,926 Reputation points
    2022-06-16T07:32:42.877+00:00

    Hi there,

    This article tells how to set up a rule for a dynamic group in the Azure portal. Dynamic membership is supported for security groups and Microsoft 365 Groups.

    Create or update a dynamic group in Azure Active Directory https://learn.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-create-rule

    Dynamic groups require Azure AD Premium P1 license or Intune for Education license.

    Add groups to organize users and devices https://learn.microsoft.com/en-us/mem/intune/fundamentals/groups-add

    ------------------------------------------------------------------------------------------------------------------------------------------------

    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

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.