GCC Outlook support
Does this package support reading and downloading emails from an outlook inbox that is in a GCC High environment? I see in the documentation it details support for GCC High sharepoint, but I am wondering just for an email inbox specifically.
Greetings,
indeed, at the moment the library officially supports SharePoint Online and OneDrive for Business (via ClientContext client) for GCC High endpoints.
In terms of Outlook, since Microsoft Graph supports National cloud deployments, the following example demonstrates how to work with Outlook Mail API via GCC High environment:
def acquire_token():
authority_url = "https://login.microsoftonline.us/{0}".format(tenant_name)
app = msal.ConfidentialClientApplication(
authority=authority_url,
client_id=client_id,
client_credential=client_secret,
)
return app.acquire_token_for_client(scopes=["https://graph.microsoft.us/.default"])
def construct_request(request):
request.url = request.url.replace("https://graph.microsoft.com", "https://graph.microsoft.us")
client = GraphClient(acquire_token)
client.before_execute(construct_request)
messages = client.users[test_user_principal_name].messages.get().execute_query()
Note:
App needs to be registered in the specific national cloud, in this case in
https://portal.azure.us/