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

[SingleAccountMode] GetCurrentAccount does not return MSA accounts if broker is installed #1092

Closed
shahzaibj opened this issue Jul 10, 2020 · 0 comments · Fixed by #1097
Closed
Assignees
Labels
Bug - P2 A problem that needs to be fixed for a feature to function as intended

Comments

@shahzaibj
Copy link
Contributor

shahzaibj commented Jul 10, 2020

If broker is installed then requests go through the broker, however MSA accounts aren't actually saved in the broker and are rather saved directly in MSAL local cache. This means that when we do lookup for current account in MSAL Single Account Mode, we need to look inside both broker as well as local cache since the account could be in local cache even if the broker is installed and that is what happens in the case of MSA accounts.

Right now we aren't doing that and we just look into broker if broker is there. See this: https://github.com/AzureAD/microsoft-authentication-library-for-android/blob/dev/msal/src/main/java/com/microsoft/identity/client/SingleAccountPublicClientApplication.java#L118

We need to change the logic to look into both.

ADO Work Item: https://dev.azure.com/IdentityDivision/Engineering/_boards/board/t/Auth%20Client%20-%20Android/Backlog%20items/?workitem=1073647

@shahzaibj shahzaibj added the Bug - P2 A problem that needs to be fixed for a feature to function as intended label Jul 10, 2020
@shahzaibj shahzaibj self-assigned this Jul 10, 2020
shahzaibj added a commit that referenced this issue Jul 14, 2020
iambmelt added a commit that referenced this issue Jul 29, 2020
* Add UI Tests in MSAL (#1047)

* Initial commit for msal automation app

* Updates to msal automation app

* Initial commit for ui autmation tests

* Updates to ui automation

* Add more ui automator tests

* Fix bugs in ui tests

* Add msal automated test, remove unused files

* Automate msal us gov sov cloud test plan

* Move ui test utilities to its own module

* Add ui automator versions to versions.gradle

* Add ui automation utilities to msal project

* Remove stale test code

* Remove stale code from setup

* Update submodule

* Rename packages

* Remove ignored tests

* Remove test application id; fix comment

* Refactor test setup logic

* Add mising license

* Remove acquire token btn from automation app

* Remove redundant username variable

* Disable test toast temporarily

* Update submodule

* Address comments

* Add comments with test descriptions

* Update submodule

* Remove mockito from automation test app deps

* Update submodule

* Update submodule

* Add correlation id to Authentication Result

* Update submodule

* Add new line at end of IAuthenticationResult.java

* Address comments

* Add unit tests for command parameters and correlation id

* Add unit tests for Authentication Result and correlation id

* Update submodule

* Address comments

* Update submodule

* changes

* Add single account overload tests (#1070)

* Add single account pca overload network tests

* Add mocked tests for single account overloads

* Remove unused code

* Update submodule

* Add back private

* Update submodule

* Update submodule to latest (#1073)

* Add basic b2c ui tests

* Add b2c tests for idlab siso policy

* Update submodule

* Update snapshot

* removed extra line

* Clean up b2c test code

* Update submodule

* Update submodule

* Update submodule to latest (#1082)

* Closes #1084 - Load properties via withInputStream syntax to auto-close (#1085)

* Closes #1084

* Goovier syntax

* Hotfix Release 1.5.4 - Merge to Master (#1083) (#1087)

* Hotfix Release 1.5.4 - Merge to Master (#1083)

* Update submodule to master@2.0.12

* Update version to 1.5.4

* Update gradle deps to 2.0.12

* Update changelog

* Fix merge issue

* Update common sumbodule.

 * Document the process.

* Update the documentation for comments.

* Add enums for cloud instance and audience

* Add authority overloads to Token Parameters

* Add tests for token parameters authority

* Add javadoc to enum constants

* Throw error if tenant specified but audience not My Org

* Remove unused method

* Fix #1092

* Fix #1096

* Update submodule

* Add Locale.ROOT to toLowerCase calls

* Post 1.5.5 Deployment Merge to Dev (#1106)

* Hotfix Release 1.5.4 - Merge to Master (#1083)

* Update submodule to master@2.0.12

* Update version to 1.5.4

* Update gradle deps to 2.0.12

* Update changelog

* MSAL Release 1.5.5 (#1104)

* Update submodule pointer to common@2.0.14

* Update version.properties

* Update changelog

* Update dependencies

* Update common submodule pointer to common@2.0.12-hf1

* Update changelog for hf versioning

* Update dependency for common@2.0.12-hf1

* Update snapshot, dist to 2.0.14 versions

* Update submodule pointer to common@2.0.15

* Update changelog for 1.6.0

* Update version.properties for 1.6.0-RC1

* Update build.gradle deps for 2.0.15-RC1

* Set submodule pointer to common@master (2.0.15)

* Set version.properties to 1.6.0

* Update build.gradle for common@2.0.15

* Update changelog for 1.6.0

Co-authored-by: Shahzaib <37125644+shahzaibj@users.noreply.github.com>
Co-authored-by: shahzaibj <shahzaib.jameel@microsoft.com>
Co-authored-by: Tanmay Manolkar <tamanolk@microsoft.com>
Co-authored-by: tanmaymanolkar1 <65260743+tanmaymanolkar1@users.noreply.github.com>
Co-authored-by: kreedula <kreedula@microsoft.com>
Co-authored-by: Krishna Eedula <38264932+kreedula@users.noreply.github.com>
Co-authored-by: Adam Johnson <adjoh@microsoft.com>
Co-authored-by: AdamBJohnsonx <63813613+AdamBJohnsonx@users.noreply.github.com>
Co-authored-by: Shane Oatman <shoatman@microsoft.com>
iambmelt added a commit that referenced this issue Jul 30, 2020
* Hotfix Release 1.5.4 - Merge to Master (#1083)

* Update submodule to master@2.0.12

* Update version to 1.5.4

* Update gradle deps to 2.0.12

* Update changelog

* MSAL Release 1.5.5 (#1104)

* Update submodule pointer to common@2.0.14

* Update version.properties

* Update changelog

* Update dependencies

* Update common submodule pointer to common@2.0.12-hf1

* Update changelog for hf versioning

* Update dependency for common@2.0.12-hf1

* Release MSAL 1.6.0 (#1108)

* Add UI Tests in MSAL (#1047)

* Initial commit for msal automation app

* Updates to msal automation app

* Initial commit for ui autmation tests

* Updates to ui automation

* Add more ui automator tests

* Fix bugs in ui tests

* Add msal automated test, remove unused files

* Automate msal us gov sov cloud test plan

* Move ui test utilities to its own module

* Add ui automator versions to versions.gradle

* Add ui automation utilities to msal project

* Remove stale test code

* Remove stale code from setup

* Update submodule

* Rename packages

* Remove ignored tests

* Remove test application id; fix comment

* Refactor test setup logic

* Add mising license

* Remove acquire token btn from automation app

* Remove redundant username variable

* Disable test toast temporarily

* Update submodule

* Address comments

* Add comments with test descriptions

* Update submodule

* Remove mockito from automation test app deps

* Update submodule

* Update submodule

* Add correlation id to Authentication Result

* Update submodule

* Add new line at end of IAuthenticationResult.java

* Address comments

* Add unit tests for command parameters and correlation id

* Add unit tests for Authentication Result and correlation id

* Update submodule

* Address comments

* Update submodule

* changes

* Add single account overload tests (#1070)

* Add single account pca overload network tests

* Add mocked tests for single account overloads

* Remove unused code

* Update submodule

* Add back private

* Update submodule

* Update submodule to latest (#1073)

* Add basic b2c ui tests

* Add b2c tests for idlab siso policy

* Update submodule

* Update snapshot

* removed extra line

* Clean up b2c test code

* Update submodule

* Update submodule

* Update submodule to latest (#1082)

* Closes #1084 - Load properties via withInputStream syntax to auto-close (#1085)

* Closes #1084

* Goovier syntax

* Hotfix Release 1.5.4 - Merge to Master (#1083) (#1087)

* Hotfix Release 1.5.4 - Merge to Master (#1083)

* Update submodule to master@2.0.12

* Update version to 1.5.4

* Update gradle deps to 2.0.12

* Update changelog

* Fix merge issue

* Update common sumbodule.

 * Document the process.

* Update the documentation for comments.

* Add enums for cloud instance and audience

* Add authority overloads to Token Parameters

* Add tests for token parameters authority

* Add javadoc to enum constants

* Throw error if tenant specified but audience not My Org

* Remove unused method

* Fix #1092

* Fix #1096

* Update submodule

* Add Locale.ROOT to toLowerCase calls

* Post 1.5.5 Deployment Merge to Dev (#1106)

* Hotfix Release 1.5.4 - Merge to Master (#1083)

* Update submodule to master@2.0.12

* Update version to 1.5.4

* Update gradle deps to 2.0.12

* Update changelog

* MSAL Release 1.5.5 (#1104)

* Update submodule pointer to common@2.0.14

* Update version.properties

* Update changelog

* Update dependencies

* Update common submodule pointer to common@2.0.12-hf1

* Update changelog for hf versioning

* Update dependency for common@2.0.12-hf1

* Update snapshot, dist to 2.0.14 versions

* Update submodule pointer to common@2.0.15

* Update changelog for 1.6.0

* Update version.properties for 1.6.0-RC1

* Update build.gradle deps for 2.0.15-RC1

* Set submodule pointer to common@master (2.0.15)

* Set version.properties to 1.6.0

* Update build.gradle for common@2.0.15

* Update changelog for 1.6.0

Co-authored-by: Shahzaib <37125644+shahzaibj@users.noreply.github.com>
Co-authored-by: shahzaibj <shahzaib.jameel@microsoft.com>
Co-authored-by: Tanmay Manolkar <tamanolk@microsoft.com>
Co-authored-by: tanmaymanolkar1 <65260743+tanmaymanolkar1@users.noreply.github.com>
Co-authored-by: kreedula <kreedula@microsoft.com>
Co-authored-by: Krishna Eedula <38264932+kreedula@users.noreply.github.com>
Co-authored-by: Adam Johnson <adjoh@microsoft.com>
Co-authored-by: AdamBJohnsonx <63813613+AdamBJohnsonx@users.noreply.github.com>
Co-authored-by: Shane Oatman <shoatman@microsoft.com>

* Unblock publish pipeline (#1113)

Co-authored-by: Shahzaib <37125644+shahzaibj@users.noreply.github.com>
Co-authored-by: shahzaibj <shahzaib.jameel@microsoft.com>
Co-authored-by: Tanmay Manolkar <tamanolk@microsoft.com>
Co-authored-by: tanmaymanolkar1 <65260743+tanmaymanolkar1@users.noreply.github.com>
Co-authored-by: kreedula <kreedula@microsoft.com>
Co-authored-by: Krishna Eedula <38264932+kreedula@users.noreply.github.com>
Co-authored-by: Adam Johnson <adjoh@microsoft.com>
Co-authored-by: AdamBJohnsonx <63813613+AdamBJohnsonx@users.noreply.github.com>
Co-authored-by: Shane Oatman <shoatman@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug - P2 A problem that needs to be fixed for a feature to function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant