Skip to content

[Identity] Check for AADSTS error in CLI-based credentials#30047

Merged
pvaneck merged 1 commit intoAzure:mainfrom
pvaneck:identity-checkout
Sep 6, 2023
Merged

[Identity] Check for AADSTS error in CLI-based credentials#30047
pvaneck merged 1 commit intoAzure:mainfrom
pvaneck:identity-checkout

Conversation

@pvaneck
Copy link
Copy Markdown
Member

@pvaneck pvaneck commented Apr 24, 2023

In some cases, when using the CLI credentials, the error message might contain the "az login" substring, but not really be an error about the user not being logged in. This changes adds a check for "AADSTS" in stderr before giving users the NOT_LOGGED_IN error message. .NET does something similar already.

Closes: #29649

@pvaneck pvaneck force-pushed the identity-checkout branch from 54715e9 to c55d6b6 Compare May 18, 2023 18:46
@pvaneck pvaneck changed the title [Identity] Propagate stderr in CLI-based credentials [Identity] Check for AADSTS error in CLI-based credentials May 18, 2023
@azure-sdk
Copy link
Copy Markdown
Collaborator

API change check

API changes are not detected in this pull request.

Comment thread sdk/identity/azure-identity/azure/identity/_credentials/azd_cli.py Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 4, 2023

Hi @pvaneck. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions Bot added the no-recent-activity There has been no recent activity on this issue. label Aug 4, 2023
@pvaneck pvaneck removed the no-recent-activity There has been no recent activity on this issue. label Aug 11, 2023
In some cases, when using the CLI credentials, the error message might
contain the "az login" substring, but not really be an error about the
user not being logged in. This changes adds a check for "AADSTS" in
stderr before giving users the NOT_LOGGED_IN error message.

Signed-off-by: Paul Van Eck <paulvaneck@microsoft.com>
@pvaneck pvaneck merged commit 3cc60cd into Azure:main Sep 6, 2023
@pvaneck pvaneck deleted the identity-checkout branch September 6, 2023 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve "not logged in" checking for CLI-credentials.

4 participants