microsoftgraph / msgraph-sdk-serviceissues

Tracks service issues for follow up.
5 stars 0 forks source link

400 Error: /sites/{id}/drives/{id}/items/{id}/invite #58

Open BrennanAldridge opened 3 years ago

BrennanAldridge commented 3 years ago

I have a SPFX webpart that shares files with external users. I am Posting to sites.drives.items.invite endpoint with JSON body as follows:

{ "recipients": [ { "email": "user@domain.com" } ], "message": "Test", "requireSignIn": true, "sendInvitation": true, "roles": [ "read" ] }

I am seeing some odd behavior based on the email address property in JSON. Here is the scenario:

  1. Sharing with company users works (e.g. @contoso.com)
  2. Sharing with Gmail users works (@gmail.com)
  3. Sharing with some members of an external company domain works (bob@companyABC.com)
  4. .... but
  5. Sharing with other members of the same external company domain fails (amy@companyABC.com)

The error reported is 400 - The request is malformed or incorrect. Everything in the request is the same except for the value of recipients > email.

Other notes:

Please help me understand if this is a bug, or if there are special considerations regarding users accounts (guests / external users) that could lead to this behavior.

Thank you! -Brennan

petrhollayms commented 2 months ago

Thank you for reporting this issue. This appears to be an issue or limitation with the service APIs. Unfortunately, as the Microsoft Graph SDK team, we do not have ownership of the APIs that are causing you issues. We invite you to create a question about the service API to Microsoft Q&A and tagged with one of the [microsoft-graph-*] tags, that way it will get routed to the appropriate team for them to triage:

https://aka.ms/msgraphsupport or directly https://aka.ms/askgraph

For now, we will close the issue on our side but feel free to open it in the relevant repository if you think the issue is specific to SDK. Please let us know if this helps!

Note: We will close this repository on April 19, 2024.