Skip to content
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

O365 Authentication Issues #22

Open
frydaho opened this issue Oct 6, 2022 · 4 comments
Open

O365 Authentication Issues #22

frydaho opened this issue Oct 6, 2022 · 4 comments

Comments

@frydaho
Copy link

frydaho commented Oct 6, 2022

I've set up oauth2ms according to the instructions provided in steps.org, and I've searched the web for any clues to what I may have done incorrectly. I've spent about 15 hours trying to troubleshoot this, I'm out of ideas, and I would be very grateful to anyone who could help! :)

Every time I execute oauth2ms it opens a browser window and returns a token there, with the message "Authorization complete." Back in the terminal I see this:

tfry@tfryX1:~$ oauth2ms Opening in existing browser session. libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null) Something went wrong during authorization Server returned: {'error': 'invalid_client', 'error_description': "AADSTS700025: Client is public so neither 'client_assertion' nor 'client_secret' should be presented.\r\nTrace ID: 262be02c-ead2-4c32-a8e0-1007dc5ba700\r\nCorrelation ID: 5c9b96da-0533-46c7-b5ca-cdbfdd77f22f\r\nTimestamp: 2022-10-06 17:26:37Z", 'error_codes': [700025], 'timestamp': '2022-10-06 17:26:37Z', 'trace_id': '262be02c-ead2-4c32-a8e0-1007dc5ba700', 'correlation_id': '5c9b96da-0533-46c7-b5ca-cdbfdd77f22f'} Traceback (most recent call last): File "/usr/local/bin/oauth2ms", line 240, in <module> app_state, token = build_new_app_state(crypt) TypeError: cannot unpack non-iterable NoneType object tfry@tfryX1:~$

image

image

My config.json (the XXXs are simply obfuscating stuff):

{ "tenant_id": "9XXXXXX6-3bbd-49b8-a5bc-ecXXXXXX0b8", "client_id": "9XXXXXX5-10e4-4cdb-a13d-21XXXXXXXX71", "client_secret": "gYvXXXXXXXXXXXXXXXXXXXXXXXyfbAy", "redirect_host": "localhost", "redirect_port": "5000", "redirect_path": "/getToken/", "scopes": ["https://outlook.office.com/IMAP.AccessAsUser.All", "https://outlook.office.com/SMTP.Send"] }

image

image

What have I done wrong, and can you point me to next steps in troubleshooting this? Thank you so much in advance!!

@kuochang
Copy link

I have the similar issue. The browser page shows "Authorization complete.", but the terminal shows "TypeError: cannot unpack non-iterable NoneType object"

Any clue?

@dschwilk
Copy link

@kuochang

I have the similar issue. The browser page shows "Authorization complete.", but the terminal shows "TypeError: cannot unpack non-iterable NoneType object"

What is the url shown in the localhost browser page that states "Authorization complete."? oauth2ms will show "Authorization complete" even if no token is returned because one of the scope urls is incorrect. I don't think that explains @frydaho 's problems it it might explain your's. Caveat: I am stumbling through this myself but do have both imap and smtp now working on outlook.office365.com

@legalnonsense
Copy link

Is there a token saved in ~/.local/share/oauth2ms?

@urugang
Copy link

urugang commented May 31, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants