script uj vältozatok

This commit is contained in:
2026-02-04 12:56:12 +01:00
parent 2e0a3c9e75
commit 0d5673b02c
7 changed files with 402 additions and 7 deletions

View File

@@ -0,0 +1,21 @@
# Code snippets are only available for the latest version. Current version is 1.x
# pip install msgraph-sdk
# New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
from msgraph import GraphServiceClient
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
scopes = ['User.Read']
# Multi-tenant apps can use "common",
# single-tenant apps must use the tenant ID from the Azure portal
tenant_id = 'caee3499-03f8-4175-9fa8-a935248d0ece'
# Values from app registration
client_id = '3a08b279-1fc3-419f-a77e-31f12a0f65f7'
# azure.identity
credential = DeviceCodeCredential(
tenant_id=tenant_id,
client_id=client_id)
graph_client = GraphServiceClient(credential, scopes)