Fix SharePoint Online Access Denied When Renaming a Subsite URL with CSOM
Question details
Find out why a SharePoint Online subsite URL change is denied through CSOM and identify supported alternatives.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- A user wants to change a subsite URL programmatically using the SharePoint client-side object model (CSOM).
- Observed behavior
- Changing the subsite title through CSOM succeeds, but changing its URL returns a Microsoft.SharePoint.SPException with an access denied message. The URL change may work in the SharePoint interface.
Identify the account or app used by the CSOM code and the account used in the SharePoint interface. Collect the complete exception details, the relevant code, and the permissions granted to each identity.
Check CSOM permissions and use SharePoint settings for the URL change
Use this approach when the URL change works in SharePoint but fails through CSOM.
A successful title update does not establish that the same identity can change the URL. The operation may have different permission requirements or CSOM limitations.
Check the authentication code or app configuration to identify the user or app running the CSOM request, then compare it with the account signed in to SharePoint.
In the SharePoint site, open Settings > Site permissions to review user access. If the code uses an app, ask an administrator to verify its SharePoint permissions and consent in the relevant app registration.
Open the subsite and go to Settings > Site information > View all site settings, then select Title, description, and logo. If a web address field is available, enter the new address and save the change.
Open the new subsite address in a browser and confirm that it loads. If the address field is unavailable or the change is denied, contact a SharePoint administrator.

Get help with the CSOM exception
Use this option if permissions appear correct or you need to determine whether the code path is supported.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and support for common Microsoft Office formats, making it easier to move everyday document work to WPS. It does not change SharePoint permissions or fix CSOM errors.

Frequently Asked Questions
Why can CSOM change the subsite title but not its URL?
Changing the URL may require different permissions or may be subject to CSOM limitations. Compare the identity and permissions used by the code with those used in the SharePoint interface.
Where can I change a subsite address in SharePoint?
On the subsite, open Settings > Site information > View all site settings > Title, description, and logo. If a web address field is available, you can enter the new address there.
What app permissions should I check?
Ask an administrator to review the SharePoint permissions and consent granted to the app registration used by the CSOM code. Also check whether the app has access to the relevant site.
What can I do if I cannot post a question on Microsoft Q&A?
If posting returns access denied, ask a Microsoft 365 administrator to open a request through Help & support in the Microsoft 365 admin center. Include the code, permissions, and complete exception details.




