Skip to content

Enhance licensing service plan reference with Dynamic Groups usage#1899

Open
Yebbenbe wants to merge 1 commit intoMicrosoftDocs:mainfrom
Yebbenbe:patch-7
Open

Enhance licensing service plan reference with Dynamic Groups usage#1899
Yebbenbe wants to merge 1 commit intoMicrosoftDocs:mainfrom
Yebbenbe:patch-7

Conversation

@Yebbenbe
Copy link
Copy Markdown
Contributor

Added section on usage for Dynamic Groups and querying service plans directly from Microsoft Graph so less people get victimized.

Added section on usage for Dynamic Groups and querying service plans directly from Microsoft Graph so less people get victimized.
@prmerger-automator
Copy link
Copy Markdown
Contributor

@Yebbenbe : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 93ceec4:

⚠️ Validation status: warnings

File Status Preview URL Details
docs/identity/users/licensing-service-plan-reference.md ⚠️Warning Details

docs/identity/users/licensing-service-plan-reference.md

  • Line 24, Column 1: [Warning: multiple-h1s - See documentation] Multiple H1s(H1 'Usage for Dynamic Groups') are not allowed. You can only have one top-level heading.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@ttorble
Copy link
Copy Markdown
Contributor

ttorble commented Feb 25, 2026

@barclayn

Can you review the proposed changes? Note that the new heading will need to be changed to level 2 to resolve the warning preventing merge. Thanks.

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the licensing service plan reference documentation by adding guidance on using Dynamic Groups with Microsoft Graph to query service plans. The update addresses common challenges users face when working with license assignments in Dynamic Groups.

Changes:

  • Added a new "Usage for Dynamic Groups" section explaining limitations of querying licenses in Dynamic Groups
  • Included PowerShell examples for querying service plans via Microsoft Graph API
  • Provided query syntax examples for including/excluding users based on service plan assignments


# Usage for Dynamic Groups

Dynamic Groups strangely does not allowing querying for licenses - you can only query for 'user.assignedPlans', and these rarely have any sensible relation to what you see within Admin Center's Licensing portal, if any relation at all. The Validation page, if you have constructed the query correctly, WILL list off the user's assignedPlans that are being queried against - but the names listed will match neither this document nor the products they have. For example, the GUID `fafd7243-e5c1-4a3a-9e40-495efcb1d3c3` is listed as PROJECT_CLIENT_SUBSCRIPTION on this table, but simply 'Microsoft Office' when queried. Even ideas that seem reasonable, like searching for Intune to distinguish Business Standard from Business Basic - will not work, as the Intune license is likely named something completely different.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammatical error: 'does not allowing' should be 'does not allow'.

Suggested change
Dynamic Groups strangely does not allowing querying for licenses - you can only query for 'user.assignedPlans', and these rarely have any sensible relation to what you see within Admin Center's Licensing portal, if any relation at all. The Validation page, if you have constructed the query correctly, WILL list off the user's assignedPlans that are being queried against - but the names listed will match neither this document nor the products they have. For example, the GUID `fafd7243-e5c1-4a3a-9e40-495efcb1d3c3` is listed as PROJECT_CLIENT_SUBSCRIPTION on this table, but simply 'Microsoft Office' when queried. Even ideas that seem reasonable, like searching for Intune to distinguish Business Standard from Business Basic - will not work, as the Intune license is likely named something completely different.
Dynamic Groups strangely does not allow querying for licenses - you can only query for 'user.assignedPlans', and these rarely have any sensible relation to what you see within Admin Center's Licensing portal, if any relation at all. The Validation page, if you have constructed the query correctly, WILL list off the user's assignedPlans that are being queried against - but the names listed will match neither this document nor the products they have. For example, the GUID `fafd7243-e5c1-4a3a-9e40-495efcb1d3c3` is listed as PROJECT_CLIENT_SUBSCRIPTION on this table, but simply 'Microsoft Office' when queried. Even ideas that seem reasonable, like searching for Intune to distinguish Business Standard from Business Basic - will not work, as the Intune license is likely named something completely different.

Copilot uses AI. Check for mistakes.
Dynamic Groups strangely does not allowing querying for licenses - you can only query for 'user.assignedPlans', and these rarely have any sensible relation to what you see within Admin Center's Licensing portal, if any relation at all. The Validation page, if you have constructed the query correctly, WILL list off the user's assignedPlans that are being queried against - but the names listed will match neither this document nor the products they have. For example, the GUID `fafd7243-e5c1-4a3a-9e40-495efcb1d3c3` is listed as PROJECT_CLIENT_SUBSCRIPTION on this table, but simply 'Microsoft Office' when queried. Even ideas that seem reasonable, like searching for Intune to distinguish Business Standard from Business Basic - will not work, as the Intune license is likely named something completely different.

A better method is getting the 'servicePlans' directly for a user from Microsoft Graph. `Connect-MgGraph -Scopes Organization.Read.All` and login with admin.
`Get-MgUser -UserId 'user@domain.com' -Property AssignedPlans | Select-Object -ExpandProperty AssignedPlans | Select-Object servicePlanID, Service | fl` to pull a given user's servicePlans. You will likely not recognize any off these, but a comparison can be made between two target users to try to find an appropriate servicePlan ID to include/exclude.
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling error: 'off' should be 'of'.

Suggested change
`Get-MgUser -UserId 'user@domain.com' -Property AssignedPlans | Select-Object -ExpandProperty AssignedPlans | Select-Object servicePlanID, Service | fl` to pull a given user's servicePlans. You will likely not recognize any off these, but a comparison can be made between two target users to try to find an appropriate servicePlan ID to include/exclude.
`Get-MgUser -UserId 'user@domain.com' -Property AssignedPlans | Select-Object -ExpandProperty AssignedPlans | Select-Object servicePlanID, Service | fl` to pull a given user's servicePlans. You will likely not recognize any of these, but a comparison can be made between two target users to try to find an appropriate servicePlan ID to include/exclude.

Copilot uses AI. Check for mistakes.
-not (user.assignedPlans -any (assignedPlan.servicePlanId -eq "c63d4d19-e8cb-460e-b37c-4d6c34603745" and assignedPlan.capabilityStatus -eq "Enabled"))
```

`
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a stray backtick character on line 39 that should be removed, as it serves no purpose and may cause rendering issues in the documentation.

Copilot uses AI. Check for mistakes.
- **Service plans included**: A list of service plans in the product that correspond to the string ID and GUID
- **Service plans included (friendly names)**: A list of service plans (friendly names) in the product that correspond to the string ID and GUID

# Usage for Dynamic Groups
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading level should be '##' instead of '#' to maintain proper document hierarchy. The existing content uses '##' for the NOTE section at line 43.

Suggested change
# Usage for Dynamic Groups
## Usage for Dynamic Groups

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants