0

I'm trying to send a request for a shared mailbox user: GET https://graph.microsoft.com/v1.0/users/{userId}/drive This shared mailbox user doesn't have an OneDrive setup. Expected result: 404 error with Error Code: ResourceNotFound. Actual Result: 403 Forbidden with Error Code: UknownError and empty Message

For other entities, like email, calendar I got 200 with the same user. I would like to know if it can be fixed.

  • Hi, welcome to Stack Overflow. As you said, you should get 404 when user has no OneDrive setup - I get that here. Could you show the whole error from MS Graph with the response details? And is the drive in question OneDrive for business? – Danstan Apr 08 '21 at 08:17
  • Do you have permission? Use https://jwt.ms/ to parse your token and provide screenshots. – Carl Zhao Apr 08 '21 at 09:40
  • Here full stack trace: ```com.microsoft.graph.http.GraphServiceException: Error code: UnknownError Error message: GET https://graph.microsoft.com/v1.0/users/myUser/drive SdkVersion : graph-java/v2.3.2 Authorization : [PII_REDACTED] 403 : Forbidden``` – Ярослав Махнов Apr 16 '21 at 09:48
  • I believe I have permissions because for other entries I got 200 for this user. – Ярослав Махнов Apr 16 '21 at 09:50
  • Perhaps the account is "frozen", you need to go into it through the browser and unfreeze. – Alexandr Hotko Dec 29 '21 at 00:55

0 Answers0