powershell
powershell copied to clipboard
[FEATURE] Get-PnPMicrosoft365Group doesn't return AssignedLabels
Reporting an Issue or Missing Feature
Get-PnPMicrosoft365Group doesn't return AssignedLabels. Confirmed a label is applied to the group(s) I am testing with. Confirmed AssignedLabels is visible in Graph Explorer. Confirmed PnP app has at least one of the required permissions (Directory.ReadWrite.All).
Expected behavior
Get-PnPMicrosoft365Group should return a result in AssignedLabels if a label is applied to a container.
Actual behavior
Get-PnPMicrosoft365Group doesn't return AssignedLabels
Steps to reproduce behavior
Get-PnPMicrosoft365Group -Identity <group GUID>
What is the version of the Cmdlet module you are running?
2.2.0
Which operating system/environment are you running PnP PowerShell on?
- [x] Windows
- [ ] Linux
- [ ] MacOS
- [ ] Azure Cloud Shell
- [ ] Azure Functions
- [ ] Other : please specify
Hi @gautamdsheth As per the graph documentation AssignedLabels will only populate when it is added in the select property https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties
Should we add a Switch parameter to include sensitivity label ?
I can help with the feature update
@kunj-sangani - it might be helpful only if the identity parameter. If we want to return all groups, then it doesn't work. I checked it in Graph explorer.
I guess, we need to ensure that it is available only if the Identity parameter is specified. What do you think ?
@kunj-sangani - just checking in for an update. If you need assistance, feel free to let me know. I'm also more than happy to take care of the implementation if you're short on time. 😊
@DaveTheTeamsGuy - closing this. Have added an additional parameter -IncludeSensitivityLabels which you need to specify to fetch sensitivity labels. It will be available in tomorrow's nightly as well as the next major release. Thanks for raising this feature request.