Skip to main content
POST
/
onedrive
/
list_sites
Python
import os
from unstructured import UnstructuredClient

client = UnstructuredClient(
    username=os.environ.get("UNSTRUCTURED_USERNAME"),  # This is the default and can be omitted
    password=os.environ.get("UNSTRUCTURED_PASSWORD"),  # This is the default and can be omitted
)
response = client.data_source.list_onedrive_sites(
    client_id="client_id",
    client_secret="client_secret",
    tenant_id="tenant_id",
)
print(response.sites)
{
  "sites": [
    {
      "id": "<string>",
      "name": "<string>",
      "url": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.deasylabs.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Request model for listing OneDrive sites.

client_id
string
required
client_secret
string
required
tenant_id
string
required

Response

Successful Response

Response model for listing OneDrive sites.

sites
OnedriveSiteInfo · object[]
required