
I'm waiting for a response if you could please help me that would be great, thank you. @Microsoft office development team
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to read and write in a shared mailbox using python code.
I'm getting this error after running the code, it opens a page with the error:
AADSTS65002: Consent between first party application xxx and first party resource xxx must be configured via preauthorization - applications owned and operated by Microsoft must get approval from the API owner before requesting tokens for that API.
This is the code that I am trying to run:
from msal import PublicClientApplication
CLIENT_ID = "d3xxxx1c" # Microsoft default public client ID
TENANT_ID = "e0xxxxeb"
SCOPES = ["User.Read"]
app = PublicClientApplication(CLIENT_ID, authority=f"https://login.microsoftonline.com/{TENANT_ID}")
token_result = app.acquire_token_interactive(SCOPES)
print(token_result) # This should return an access token
I'm waiting for a response if you could please help me that would be great, thank you. @Microsoft office development team