Код: Выделить всё
import asyncio
from msgraph import GraphServiceClient
from azure.identity import ClientSecretCredential
microsoft_tenant_id = '123abc'
client_id = '123abc'
client_secret = '123abc'
SCOPES = ['https://graph.microsoft.com/.default']
credential = ClientSecretCredential(microsoft_tenant_id, client_id, client_secret)
graph_client = GraphServiceClient(credential, SCOPES)
user_id = 'myemail@companyname.com'
async def get_drive_count():
# What do I use after .drives?
response = await graph_client.users.by_user_id(user_id).drives... # not sure what to use next
asyncio.run(get_drive_count())
Я пробовал использовать .root. Children.get(), но в SDK нет ни одного из этих методов.
Кто-нибудь знает, как извлечь все файлы OneDrives с помощью SDK?
Подробнее здесь: https://stackoverflow.com/questions/789 ... -graph-sdk
Мобильная версия