400 Bad Request - noResolvedUsers

Marcel Ouška 0 Reputation points
2023-01-16T14:53:10.86+00:00

Hello,

We are getting an error noResolvedUsers - One or more users could not be resolved.

POST /drives/{drive-id}/items/{item-id}/invite

We implemented an adapter that is able to share documents to external users on sharepoint using Microsoft Graph API. We found out that sharing doesn't work if this specific checkbox is checked:

User's image

As you can see here Sharepoint and OneDrive have Content sharing setup to "Anyone". We also setup root site and the specific site and put there that the links can be shared with anyone, so the issue doesnt seem to be there. Here is settings that we have on the root site and the site we are working with:
User's image

Unfortunatelly we cannot uncheck that checkbox as our customer needs the mentioned functionality as well.

If we uncheck it, it works just fine regardles of other security settings, but that is not a solution for us

If we change other security settings like the sliding bars "Content can be shared with" it still works but as soon as we check the "Allow only users in specific security groups to share externally" it stops working.

We are communicating with the graphAPI as an application. We also tried to communicate as a delegate role but we were still unable to make it work. This problem persists regardless. We use the API for other functions like creating folders and changing their attributes - that works just fine, the API is setup correctly.

There seems to be an issue with Microsoft Graph API.

I will also link the articles and other questions i found on this topic. Most of them mention seting up visibility to Anyone, but unfortunatelly that doesnt work as it seems Microsoft Graph api is ignoring it.

Here are related articles:

  • [https://learn.microsoft.com/en-us/answers/questions/438419/getting-400-bad-request-with-error-code-noresolved
  • [https://stackoverflow.com/questions/68000102/getting-400-bad-request-with-error-code-noresolvedusers-when-granting-permissi
  • [https://github.com/OneDrive/onedrive-api-docs/issues/1497

This issue seems to be mentioned several times but never actually resolved.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,482 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HarmeetSingh7172 4,826 Reputation points
    2023-01-17T14:21:23.0866667+00:00

    Hello @Marcel Ouška

    Thanks for reaching out!

    Based on my research on this issue, external sharing does not work if the user who is trying to share with external user is not part of mentioned security group. External sharing will work only for those users who are part of mentioned security group.

    Please refer this documentation.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.