I3-20250715114325-20250717052906
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Issue by lovish201 Added at 2025-07-15T11:43:25Z
Issue by lovish201 Added at 2025-07-15T05:36:40Z
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
To permanently delete a SharePoint site (especially modern Team or Communication sites), you can use the Microsoft Graph API or SharePoint REST API.
β Recommended: Microsoft Graph API (Modern Sites Only)
π₯ Permanently Delete a Site Collection
DELETE https://graph.microsoft.com/v1.0/sites/{site-id}
Authorization: Bearer {access-token}
This deletes the site permanently (no recycle bin). Ensure you are passing the correct
site-id(not the URL).
π How to Get site-id
GET https://graph.microsoft.com/v1.0/sites/{domain-name}.sharepoint.com:/sites/{site-name}
Response will contain "id" like:
"id": "domain.sharepoint.com,abcd123,xyz456"
Use that id in the DELETE call.
β οΈ Caution
- This will delete the entire site, including all document libraries, lists, pages, etc.
- This action bypasses the site recycle bin β itβs irreversible via UI.
- Use it only if you're absolutely sure.
π Required Permissions
In Azure AD App, grant the following Graph permissions:
Sites.ReadWrite.All(application)Sites.FullControl.All(for full delete)
π§ͺ Example with curl
curl -X DELETE https://graph.microsoft.com/v1.0/sites/{site-id} \
-H "Authorization: Bearer {access-token}"
ποΈ Alternative: SharePoint REST API (Classic Sites)
If you're dealing with a classic site, use:
POST https://{site-url}/_api/SPSiteManager/Delete
Content-Type: application/json;odata=verbose
Authorization: Bearer {access-token}
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.
{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the **tenant recycle bin** (can be restored using `Restore` API unless purged).
---
Let me know your **site type (Team/Comm, classic)** and whether you're using **Graph SDK, REST, or Python**, and Iβll tailor a code snippet for you.{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the tenant recycle bin (can be restored using Restore API unless purged).
Let me know your site type (Team/Comm, classic) and whether you're using Graph SDK, REST, or Python, and Iβll tailor a code snippet for you.{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the **tenant recycle bin** (can be restored using `Restore` API unless purged).
---
Let me know your **site type (Team/Comm, classic)** and whether you're using **Graph SDK, REST, or Python**, and Iβll tailor a code snippet for you.{
"siteUrl": "https://yourtenant.sharepoint.com/sites/sitename"
}
This deletes the site collection and sends it to the **tenant recycsdfsdfsdsd
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up β it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names Microsoft Graph API, SharePoint REST API, Azure AD, and curl but mentions no repository files, tests, or entry points. First clarify whether a documentation change is requested and which site-deletion workflow it should cover; done would require a defined documentation target and acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100