You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enumerating sensitivity labels using application permissions tries to access me/informationprotection/policy/labels endpoint -resulting in an error.
I'm able to get the labels from the Graph API by executing a custom query, so I have the appropriate permissions for my app registration. I have verified that I'm using application permission as await context.GetMicrosoft365Admin().AccessTokenUsesApplicationPermissionsAsync() returns true (and I have not configured delegate permissions anyways).
Steps to reproduce
Run var labels = await context.GetMicrosoft365Admin().GetSensitivityLabelsAsync();
@mortenostigard : never mind, found the bug and fixed it. There was a method SensitivityLabelManager.GetLabelsAsync that checked for the permission type and called the application or delegated variant. This method was however not called from the end point, we hardcoded called the delegated one.
This is fixed now and changes will appear in the next nightly build (version 1.6.81 or higher).
Thanks for using PnP Core SDK and providing the feedback.
Closing this now, feel free to re-open if you still face issues with the updated build.
Describe the bug
Enumerating sensitivity labels using application permissions tries to access
me/informationprotection/policy/labels
endpoint -resulting in an error.I'm able to get the labels from the Graph API by executing a custom query, so I have the appropriate permissions for my app registration. I have verified that I'm using application permission as
await context.GetMicrosoft365Admin().AccessTokenUsesApplicationPermissionsAsync()
returnstrue
(and I have not configured delegate permissions anyways).Steps to reproduce
Run
var labels = await context.GetMicrosoft365Admin().GetSensitivityLabelsAsync();
with application permissions.
Environment details (development & target environment)
SDK version: 1.6.76-nightly
OS: Windows 11
SDK used in: .NET
Framework: .NET 6
Browser(s): N/A
Tooling: N/A
Additional details:
The text was updated successfully, but these errors were encountered: