I am trying to use Graph API (Beta) to get the Legal Hold information from compliance.microsoft.com for my tenant. For this purpose I am using "https://graph.microsoft.com/beta/compliance/ediscovery/cases" endpoint.
But when I try it from Graph Explorer I get "Unauthorized" error even after giving consent to "eDiscovery.ReadWrite.All" permission. (Though graph explorer->Modify permissions still says "Admin Consent Required"->"Yes". Not sure why.)
Seeing similar error from postman when I try after granting eDiscovery.ReadWrite.All permission to my Azure AD App.
Has anyone been able to query this endpoint? Let me know if I am missing any permission or config.
These are the 2 permissions required for the accessing this API, you also need eDiscovery.Read.All permission , this work only for delegated permissions and you can also decode your token in jwt.ms and check scopes if those permissions are available.
Hope this helps.