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

Personal Account and User-Auth Fails #277

Open
1 of 3 tasks
ericjohannsen opened this issue Jul 31, 2024 · 2 comments
Open
1 of 3 tasks

Personal Account and User-Auth Fails #277

ericjohannsen opened this issue Jul 31, 2024 · 2 comments
Labels
needs author feedback Waiting for author (creator) of issue to provide more info

Comments

@ericjohannsen
Copy link

Where did you get the code?

Describe the bug

Unable to register an application using a personal account using either method described in README.md under user-auth

To Reproduce
Steps to reproduce the behavior:

The readme in the user-auth folder states to register an application using Azure Active Directory admin center or with the provided Powershell script.

Using AAD with a personal account subscribed to O365 yields this error:

image

The Sign in again button leads to:

image

When I instead attempt to register the application using the provided Powershell script, that script informs me to:

To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code XXXXXXXX to authenticate.

On that page, I am prompted:

image

I enter the personal email address with which I am subscribed to O365 and get the error message:

image

If I instead sign in with an outlook.com email address, otherwise following the same procedure, I get:

image

Expected behavior
The application registration process should succeed

Screenshots
See reproduction steps

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Version 127.0.6533.88

Dependency versions

  • Authentication library (MSAL, etc.) version:
  • Graph library (Graph SDK, REST library, etc.) version:

Version Name Repository Description


2.21.0 Microsoft.Graph PSGallery Microsoft Graph PowerShell module

Additional context

@jasonjoh
Copy link
Member

Focusing on your first error - that indicates that the registered application was registered with the Accounts in this organizational directory only option, and you're attempting to sign into that application with an account (from live.com) that does not exist in the organization where you registered the app.

If you're looking to support personal accounts, you should create an app registration with the Accounts in any organizational directory ... and personal Microsoft accounts option.

@jasonjoh jasonjoh added the needs author feedback Waiting for author (creator) of issue to provide more info label Jul 31, 2024
@ericjohannsen
Copy link
Author

I appreciate the feedback. This is a new topic for me so I followed the instructions in README.md verbatim. I don't know how to follow your advice, but I'll spend some time looking into it this evening and will create a PR for README.md if I find something useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs author feedback Waiting for author (creator) of issue to provide more info
Projects
None yet
Development

No branches or pull requests

2 participants