Why Graph Patch call return OK status while Sharepoint resource haven't been patched

Nicolas Pozzi 31 Reputation points
2021-04-12T10:20:47.637+00:00

Hello everyone,

We have experienced some strange behavior with Microsoft Graph. Let me explain to you.

We are using Graph to make calls to SharePoint. Especially, we are making PATCH calls to rename Document Library. This works pretty well, we are doing this on several SharePoint tenants.

We are just experiencing one problem with one Tenant in particular.

On this Tenant, although the PATCH call return a 200 status code, the document library is never patched (never renamed).

However, we can rename the document library manually. (See the linked image)

But it doesn't seems to work perfectly neither: the name is not updated in the list of the documents library. (See second image linked)

Here are the calls and some code we are using :

PATCH call https://graph.microsoft.com/v1.0/sites/{TenantId}/Lists/NPO - Entity 2 (npo_entity_2)

with Json object

{ 'displayName' : 'new name' }

Here are a sample of the code we are using

var query = _graphClient.Sites[{TenantId}].Lists['NPO - Entity 2 (npo_entity_2)'].RequestUrl;

//return the same Url than above

var request = await query .WithOAuthBearerToken(await GetToken()) .PatchJsonAsync(new { displayName = 'New name' });

Voilà, you know everything. If someone has already experienced that type of problem that would be very helpful for us ! :)

Thank you in advance,

Nicolas.

86884-screenshot-2021-04-12-121420.png

86885-screenshot-2021-04-12-121446.png

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. MichaelHan-MSFT 18,126 Reputation points
    2021-04-13T07:35:57.023+00:00

    Hi @Nicolas Pozzi ,

    I did a test on my tenant, making PATCH calls to rename Lists works perfectly on my end.

    Did this issue happen in all lists/libraries with this tenant? Or just this specific library?

    If all lists/libraries have this issue in this tenant, you'd better create a service request with Microsoft to check what's going on in the backend.


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Nicolas Pozzi 31 Reputation points
    2021-04-13T10:21:43.463+00:00

    Hi Michael,

    It's only happening for the documents library, all of them. This working perfectly well on the list.

    We are experiencing the bug only with one tenant, and only with Document Library.

    Thanks, I'm going to do that.

    0 comments No comments

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.