Sharepoint API is retrieving old document library name even if the library name is modified in SharePoint

Ravi Varma 0 Reputation points
2024-10-17T07:35:26.5333333+00:00

Sharepoint API is always retrieves old document library name even if the library name is modified in SharePoint.

URL used to fetch the site contents: https://{resourceUrl}/sites/{site}/_api/Web/GetFolderByServerRelativeUrl(%27/sites/highspotqa/alpha%27)?$select=Name,ServerRelativeUrl,TimeCreated,TimeLastModified

Please find the attached screenshots of sharepoint site & the API Response:User's image

Screenshot 2024-10-17 at 12.03.58 PM

Please help on this.

Thanks,

Ravi Varma

Microsoft 365 and Office | SharePoint | Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2024-10-17T09:02:47.94+00:00

    Hi @Ravi Varma ,

    The UI way changes the sharepoint library name, but the internal name is not changed. The Library Name fetched using the API should be the internal name, so the name before the change is displayed.

    User's image

    You can change the InternalName with SharePoint Designer and with PowerShell, Please refer to:https://www.c-sharpcorner.com/blogs/change-sharepoint-online-list-or-library-internal-name

    Then check the api to get the name result.

    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.


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

    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.


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.