Forum Discussion

Davwa's avatar
Davwa
Copper Contributor
Mar 21, 2023

Dynamic device group or PS Script

Dynamic device group or PS Script.

Im trying to make an Dynamic device group with the device that users own.

For example User "Dave" owns device "NB01" and "LP01" then i want NB01 & LP01 in my dynamic device group. The only thing i found that i can include device or personal devices. Is there any solution?

  • Davwa 

    To create a dynamic device group in Azure that includes only the devices owned by a specific user, you can follow the steps below:

    1. Go to the Azure Portal (https://portal.azure.com) and navigate to Azure Active Directory.
    2. In the left-hand menu, click on "Groups".
    3. Click on "+ New group".
    4. In the "Basics" tab, enter a name and description for the group.
    5. In the "Membership type" section, select "Dynamic Device" as the membership type.
    6. In the "Dynamic Device" tab, enter a name and description for the dynamic device rule.
    7. In the "Add expression" section, click on the "+ Add" button to add a new expression.
    8. In the "Attribute" dropdown, select "DeviceOwnership".
    9. In the "Operator" dropdown, select "Equals".
    10. In the "Value" field, enter the email address of the user who owns the devices you want to include in the group.
    11. Click on the "+ Add" button to save the expression.
    12. Click on "Create" to create the group.

    The dynamic device group will now be created, and it will automatically include all devices that are owned by the specified user. This group will be updated dynamically as devices are added or removed, based on the ownership criteria

     

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily.

    • Davwa's avatar
      Davwa
      Copper Contributor
      Hi eliekarkafy,

      It then gives an error: [deviceownership = "Company' ]
      The only output for DeviceOwnership is Company Personal and Unknown
      • I think there is not a built attribute for this. As workaround you can add a custom attribute to the device with the owner and create a dynamic rule based on that attribute

Resources