-
-
Notifications
You must be signed in to change notification settings - Fork 23
HTTP Error 401: Unauthorized - SMTP - Outlook #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Did you enable API permissions for |
Hello, |
Hello, I tested your change and managed to ask for the secret token, but now the access_token is thrown on my screen and is not saved anywhere, can you tell me where it should be saved and what the syntax of the content inside the file should be ? |
Copying my comment from #62: The token tool will write the resulting access token to a file if you specify a path on the command line. See the example usage here (look for And thanks @krzsztf1 for the fix! I can only assume something changed with Microsoft's OAuth 2 flow, because I've gone through the setup flow with this tooling in the past and it worked (or maybe the secret is required only for folks specifying a tenant?). |
Hi!! @tarickb @krzsztf1 I'm still getting some errors, I collected the data and settings to see if you can help me, follow below. Note: I changed the sensitive words/tokens, but where they are described they are related.
I cut some of the maillot, as the error was the same and repetitive. Again if you look for "juice" in the x-file you will find the same "juice" where it should be. |
Can you try adding your client secret to |
After tuning, it worked perfectly. Thanks! |
Hello, I'm trying to configure Xoauth on my Linux server, I followed the readme as informed, after running the command below and returning the URL presented to the server, I get the 401 error described below
[root@ip-172-31-66-222 ~]# sasl-xoauth2-tool get-token outlook --client-id= --tenant=
Please visit the following link in a web browser, then paste the resulting URL:
https://login.microsoftonline.com/xxxxxxxxx-xxxxx-xxxx-xxxxxxxx-xxxxxxx/oauth2/v2.0/authorize...
Iam return:
Resulting URL: https://login.microsoftonline.com/common/oauth2/nativeclient.....xxxxxxxxx/xxxx/xx
Error:
Traceback (most recent call last):
File "/usr/bin/sasl-xoauth2-tool", line 301, in
main()
File "/usr/bin/sasl-xoauth2-tool", line 294, in main
args.func(args)
File "/usr/bin/sasl-xoauth2-tool", line 200, in subcommand_get_token
args.output_file,
File "/usr/bin/sasl-xoauth2-tool", line 183, in get_token_outlook
tokens = outlook_get_initial_tokens(client_id, tenant, code)
File "/usr/bin/sasl-xoauth2-tool", line 167, in outlook_get_initial_tokens
headers={ "Content-Type": "application/x-www-form-urlencoded" }))
File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
The text was updated successfully, but these errors were encountered: