Retrieves a list of OneDrive sites for a specified customer tenant.
The Get-CIPPOneDriveList function retrieves a list of OneDrive sites for a specified customer tenant. It uses the Invoke-CIPPRestMethod function to make a REST API call to retrieve the sites.
The ID of the customer tenant for which to retrieve the OneDrive sites.
Specifies whether to return only the URLs of the OneDrive sites. If this switch is used, only the URLs will be returned.
The user's UPN (User Principal Name) for which to retrieve the OneDrive sites. This parameter is optional.
PS>Get-CIPPOneDriveList -CustomerTenantID "example.com"
Retrieves a list of OneDrive sites for the customer tenant with the ID "example.com".
PS>Get-CIPPOneDriveList -CustomerTenantID "example.com" -urlonly
Retrieves a list of OneDrive site URLs for the customer tenant with the ID "example.com".
PS>Get-CIPPOneDriveList -CustomerTenantID "example.com" -UserUPN "user@example.com"
Retrieves a list of OneDrive sites for the customer tenant with the ID "example.com" and the specified user's UPN "user@example.com".