Enhance licensing service plan reference with Dynamic Groups usage#1899
Enhance licensing service plan reference with Dynamic Groups usage#1899Yebbenbe wants to merge 1 commit intoMicrosoftDocs:mainfrom
Conversation
Added section on usage for Dynamic Groups and querying service plans directly from Microsoft Graph so less people get victimized.
|
@Yebbenbe : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 93ceec4:
|
| File | Status | Preview URL | Details |
|---|---|---|---|
| docs/identity/users/licensing-service-plan-reference.md | 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.
|
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 #label:"aq-pr-triaged" |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Grammatical error: 'does not allowing' should be 'does not allow'.
| 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. |
| 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. |
There was a problem hiding this comment.
Spelling error: 'off' should be 'of'.
| `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. |
| -not (user.assignedPlans -any (assignedPlan.servicePlanId -eq "c63d4d19-e8cb-460e-b37c-4d6c34603745" and assignedPlan.capabilityStatus -eq "Enabled")) | ||
| ``` | ||
|
|
||
| ` |
There was a problem hiding this comment.
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.
| - **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 |
There was a problem hiding this comment.
The heading level should be '##' instead of '#' to maintain proper document hierarchy. The existing content uses '##' for the NOTE section at line 43.
| # Usage for Dynamic Groups | |
| ## Usage for Dynamic Groups |
Added section on usage for Dynamic Groups and querying service plans directly from Microsoft Graph so less people get victimized.