Hello !
I'm trying to search for the emails. After I successfully authenticated I receive this error:
Client Error: 401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/users/f21748de002cfcb6/mailFolders/Inbox/messages?%24top=25 | Error Message: The tenant for tenant guid '487a2b09-f033-406b-a749-99a8d1774563' does not exist.
Traceback (most recent call last):
File "D:\anaconda3\envs\office365\lib\site-packages\IPython\core\interactiveshell.py", line 3361, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in <cell line: 1>
inbox.get_messages()
File "D:\anaconda3\envs\office365\lib\site-packages\O365\mailbox.py", line 212, in get_messages
response = self.con.get(url, params=params)
File "D:\anaconda3\envs\office365\lib\site-packages\O365\connection.py", line 811, in get
return self.oauth_request(url, 'get', params=params, kwargs)
File "D:\anaconda3\envs\office365\lib\site-packages\O365\connection.py", line 800, in oauth_request
return self._internal_request(self.session, url, method, kwargs)
File "D:\anaconda3\envs\office365\lib\site-packages\O365\connection.py", line 762, in _internal_request
raise HTTPError('{} | Error Message: {}'.format(e.args[0], error_message), response=response) from None
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/users/f21748de002cfcb6/mailFolders/Inbox/messages?%24top=25 | Error Message: The tenant for tenant guid '487a2b09-f033-406b-a749-99a8d1774563' does not exist.
Hello ! I'm trying to search for the emails. After I successfully authenticated I receive this error: Client Error: 401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/users/f21748de002cfcb6/mailFolders/Inbox/messages?%24top=25 | Error Message: The tenant for tenant guid '487a2b09-f033-406b-a749-99a8d1774563' does not exist. Traceback (most recent call last): File "D:\anaconda3\envs\office365\lib\site-packages\IPython\core\interactiveshell.py", line 3361, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in <cell line: 1>
inbox.get_messages()
File "D:\anaconda3\envs\office365\lib\site-packages\O365\mailbox.py", line 212, in get_messages
response = self.con.get(url, params=params)
File "D:\anaconda3\envs\office365\lib\site-packages\O365\connection.py", line 811, in get
return self.oauth_request(url, 'get', params=params, kwargs)
File "D:\anaconda3\envs\office365\lib\site-packages\O365\connection.py", line 800, in oauth_request
return self._internal_request(self.session, url, method, kwargs)
File "D:\anaconda3\envs\office365\lib\site-packages\O365\connection.py", line 762, in _internal_request
raise HTTPError('{} | Error Message: {}'.format(e.args[0], error_message), response=response) from None
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://graph.microsoft.com/v1.0/users/f21748de002cfcb6/mailFolders/Inbox/messages?%24top=25 | Error Message: The tenant for tenant guid '487a2b09-f033-406b-a749-99a8d1774563' does not exist.
The code snippet I use:
Thanks a lot