microsoft-authentication-library-for-python icon indicating copy to clipboard operation
microsoft-authentication-library-for-python copied to clipboard

Feature request: return account from user authentication methods

Open chlowell opened this issue 5 years ago • 1 comments

I think user authentication would be more ergonomic if authentication methods returned the authenticated account.

For example, when I authenticate a user via acquire_token_by_authorization_code I get tokens and some response content from AAD but not the object I need to authenticate the same user via acquire_token_silent. For that I must call get_accounts and choose an account from the list it gives me. To be certain I'm choosing the right account I need its unique identifier. I can construct that from the response content acquire_token_by_authorization_code gave me, but only because I know the relevant implementation details.

chlowell avatar Aug 26 '20 00:08 chlowell

Marking this a bug, as the other MSALs have an Account associated with AuthenticationResult.

bgavrilMS avatar Aug 17 '23 18:08 bgavrilMS