from msal import PublicClientApplication CLIENT_ID = "2a1cb9f1-2c0c-46ad-9887-fd2bb835bc2e" AUTHORITY = "https://login.microsoftonline.com/consumers" # or your tenant ID SCOPES = ["https://graph.microsoft.com/Calendars.Read"] USERNAME = "zisco@zisco.at" PASSWORD = "3S1punk08_114$" # ⚠️ Storing passwords is risky app = PublicClientApplication(CLIENT_ID, authority=AUTHORITY) result = app.acquire_token_by_username_password( username=USERNAME, password=PASSWORD, scopes=SCOPES ) if "access_token" in result: print("Access token:", result["access_token"]) else: print("Error:", result.get("error_description"))