I want to change the URL of a modern team site (without group, STS#3) by HTTP Request. Which API request do I need to do?

I already tried by using GRAPH API but it only updates the displayName and not the URL.

    "uri": "https://graph.microsoft.com/v1.0/sites/contoso.sharepoint.com:/sites/oldname",
    "method": "PATCH",
    "headers": {
        "Content-type": "application/json",
        "Authorization": "*sanitized*"
    "body": {
        "displayName": "newname",
        "webUrl": "https://contoso.sharepoint.com/sites/newname"

You could change site url in SharePoint admin center as a workaround.

SharePoint admin center > Sites > Active sites > click your site > Edit > Edit URL

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.