largeOrg / largeOrg/myRepo1

I3-20250715114325-20250717052906

Open
#24 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up β€” it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.