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

"WARNING: It doesn't look like there was a valid access token" when using Connect-MSGraph #2

Open
ghost opened this issue Apr 13, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 13, 2020

Receiving the following error when sending Connect-MSGraph -ForceNew:

WARNING: It doesn't look like there was a valid access token.
@jhoneill
Copy link
Owner

What version of PowerShell are you running on ? I've just checked this with version 5 and version 7 and it appears to working here. If run with no other parameters and you have no window tenant it will attempt to display a logon dialog and this won't work with PowerShell 6, or on Non-windows versions of PowerShell .

@jhoneill
Copy link
Owner

I've just seen my mail, it would have helped if you'd said there was an error message before the warning. That suggests that for whatever reason it doesn't like the account you're using. I can sign in with both my Azure AD account and my Microsoft-Account so I'm stuck for what to suggest.

To answer your other question Microsoft came out with their own official module for MSGraph shortly after I finished this one, and killed any interest there might have been in it. So I haven't changed anything since August 2019.

@ghost
Copy link
Author

ghost commented Apr 13, 2020 via email

@jhoneill
Copy link
Owner

Leave the tennant ID blank, otherwise it will assume you want to hand it a credential object and a logon with an azure ID account in that tennant.

The message you emailed me has a link to here https://login.microsoft.com/error?code=50034

Which says

The user that attempted to sign in doesn't exist in this tenant. This can occur because the user mis-typed their username, or isn't in the tenant. An application may have chosen the wrong tenant to sign into, and the currently logged in user was prevented from doing so since they did not exist in your tenant. If this user should be able to log in, add them as a guest. See docs here: https://docs.microsoft.com/azure/active-directory/b2b/add-users-administrator

I can't get a bogus outlook.com account to give that error with the tenant ID left blank.

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

1 participant