Skip to content

Remove getAccountBy APIs at controller level #7807

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

Open
wants to merge 6 commits into
base: msal-v5
Choose a base branch
from

Conversation

hectormmg
Copy link
Member

This PR removes all msal-browser controller-level getAccountBy APIs

@hectormmg hectormmg changed the base branch from dev to msal-v5 June 4, 2025 21:18
@github-actions github-actions bot added documentation Related to documentation. msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package labels Jun 4, 2025
tnorling
tnorling previously approved these changes Jun 4, 2025
konstantin-msft
konstantin-msft previously approved these changes Jun 5, 2025
@hectormmg hectormmg dismissed stale reviews from konstantin-msft and tnorling via 8b951eb June 5, 2025 19:27
@@ -147,7 +147,7 @@ Please see our [MsalGuard doc](https://github.com/AzureAD/microsoft-authenticati

### How do I get accounts?

The `@azure/msal-browser` instance used by `@azure/msal-angular` exposes multiple methods for getting account information. We recommend using `getAllAccounts()` to get all accounts, and `getAccountByHomeId()` and `getAccountByLocalId()` to get specific accounts. Note that while `getAccountByUsername()` is available, it should be a secondary choice, as it may be less reliable and is for convenience only. See the [`@azure/msal-browser` docs](https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_browser.publicclientapplication.html) for more details on account methods.
The `@azure/msal-browser` instance used by `@azure/msal-angular` exposes multiple methods for getting account information. We recommend using `getAllAccounts()` to get all accounts, and `getAccount()` to get specific, filtered accounts. See the [`@azure/msal-browser` docs](https://azuread.github.io/microsoft-authentication-library-for-js/ref/classes/_azure_msal_browser.publicclientapplication.html) for more details on account methods.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be you can add an example for adding filter based on username or accountId, the most used filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation. msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants