27 lines
731 B
Python
27 lines
731 B
Python
import logging
|
|
import json
|
|
from ingestion.graph_client import GraphClient
|
|
|
|
logging.basicConfig(level=logging.INFO)
|
|
|
|
def get_real_drive_id():
|
|
client = GraphClient()
|
|
try:
|
|
site = client.get_site_by_path("285pdg.sharepoint.com", "/sites/poc_system")
|
|
site_id = site["id"]
|
|
print(f"Site ID: {site_id}")
|
|
|
|
drive = client.get_drive(site_id)
|
|
drive_id = drive["id"]
|
|
print(f"Drive ID: {drive_id}")
|
|
|
|
# Write the correct drive ID to a file so we know what it is
|
|
with open("correct_drive_id.txt", "w") as f:
|
|
f.write(drive_id)
|
|
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
get_real_drive_id()
|