{"action":"created","comment":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/comments/56950062","id":56950062,"diff_hunk":"@@ -497,29 +471,18 @@ private boolean checkAccount(final AccountManager am, String username, String un\n                 Account[] accountList = mAcctManager\n                         .getAccountsByType(AuthenticationConstants.Broker.BROKER_ACCOUNT_TYPE);\n \n-                // Authenticator installed from Company portal\n-                // This supports only one account\n+                // For new broker with PRT support, both company portal and\n+                // azure authenticator will be able to support multi-user.\n                 if (authenticator.packageName\n-                        .equalsIgnoreCase(AuthenticationConstants.Broker.PACKAGE_NAME)) {\n-                    // Adal should not connect if given username does not match\n-                    if (accountList != null && accountList.length > 0) {\n-                        return verifyAccount(accountList, username, uniqueId);\n-                    }\n-                    \n-                    return false;                    \n-\n-                    // Check azure authenticator and allow calls for test\n-                    // versions\n-                } else if (authenticator.packageName\n                         .equalsIgnoreCase(AuthenticationConstants.Broker.AZURE_AUTHENTICATOR_APP_PACKAGE_NAME)\n                         || authenticator.packageName\n-                                .equalsIgnoreCase(AuthenticationSettings.INSTANCE\n-                                        .getBrokerPackageName())) {\n-\n+                                .equalsIgnoreCase(AuthenticationConstants.Broker.COMPANY_PORTAL_APP_PACKAGE_NAME)\n+                        || authenticator.packageName\n+                                .equalsIgnoreCase(AuthenticationSettings.INSTANCE.getBrokerPackageName())) {\n                     // Existing broker logic only connects to broker for token\n                     // requests if account exists. New version can allow to\n                     // add accounts through Adal.\n-                    if (hasSupportToAddUserThroughBroker()) {\n+                    if (hasSupportToAddUserThroughBroker(authenticator.packageName)) {\n                         Logger.v(TAG, \"Broker supports to add user through app\");\n                         return true;\n                     } else if (accountList != null && accountList.length > 0) {","path":"src/src/com/microsoft/aad/adal/BrokerProxy.java","position":348,"original_position":348,"commit_id":"09b82cc91bcfe02fae2d635ee52cab4f18da2145","original_commit_id":"09b82cc91bcfe02fae2d635ee52cab4f18da2145","user":{"login":"imakhalova","id":15003397,"avatar_url":"https://avatars.githubusercontent.com/u/15003397?v=3","gravatar_id":"","url":"https://api.github.com/users/imakhalova","html_url":"https://github.com/imakhalova","followers_url":"https://api.github.com/users/imakhalova/followers","following_url":"https://api.github.com/users/imakhalova/following{/other_user}","gists_url":"https://api.github.com/users/imakhalova/gists{/gist_id}","starred_url":"https://api.github.com/users/imakhalova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imakhalova/subscriptions","organizations_url":"https://api.github.com/users/imakhalova/orgs","repos_url":"https://api.github.com/users/imakhalova/repos","events_url":"https://api.github.com/users/imakhalova/events{/privacy}","received_events_url":"https://api.github.com/users/imakhalova/received_events","type":"User","site_admin":false},"body":"you need to verity all accounts, not the first one","created_at":"2016-03-22T08:25:16Z","updated_at":"2016-03-22T08:25:16Z","html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/550#discussion_r56950062","pull_request_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550","_links":{"self":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/comments/56950062"},"html":{"href":"https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/550#discussion_r56950062"},"pull_request":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550"}}},"pull_request":{"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550","id":63441727,"html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/550","diff_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/550.diff","patch_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/550.patch","issue_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/550","number":550,"state":"open","locked":false,"title":"allow company portal to provide multi-user support","user":{"login":"weijjia","id":1166233,"avatar_url":"https://avatars.githubusercontent.com/u/1166233?v=3","gravatar_id":"","url":"https://api.github.com/users/weijjia","html_url":"https://github.com/weijjia","followers_url":"https://api.github.com/users/weijjia/followers","following_url":"https://api.github.com/users/weijjia/following{/other_user}","gists_url":"https://api.github.com/users/weijjia/gists{/gist_id}","starred_url":"https://api.github.com/users/weijjia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weijjia/subscriptions","organizations_url":"https://api.github.com/users/weijjia/orgs","repos_url":"https://api.github.com/users/weijjia/repos","events_url":"https://api.github.com/users/weijjia/events{/privacy}","received_events_url":"https://api.github.com/users/weijjia/received_events","type":"User","site_admin":false},"body":"issue #521 \r\nWith the new broker with PRT support, both broker apps (company portal and azure authenticator) will provide multi-user support. ","created_at":"2016-03-18T21:56:35Z","updated_at":"2016-03-22T08:25:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d10efaf6a64202afc327a0e754f08ffb4cd09a7c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550/commits","review_comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550/comments","review_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/550/comments","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/statuses/09b82cc91bcfe02fae2d635ee52cab4f18da2145","head":{"label":"AzureAD:dev_brokerProxyUpate","ref":"dev_brokerProxyUpate","sha":"09b82cc91bcfe02fae2d635ee52cab4f18da2145","user":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"repo":{"id":14703238,"name":"azure-activedirectory-library-for-android","full_name":"AzureAD/azure-activedirectory-library-for-android","owner":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android","description":"The ADAL SDK for Android gives you the ability to add support for Work Accounts to your application with just a few lines of additional code. This SDK gives your application the full functionality of Microsoft Azure AD, including industry standard protocol support for OAuth2, Web API integration with user level consent, and two factor authentication support.","fork":false,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android","forks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/forks","keys_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/teams","hooks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/hooks","issue_events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/events{/number}","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/events","assignees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/assignees{/user}","branches_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/branches{/branch}","tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/tags","blobs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/statuses/{sha}","languages_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/languages","stargazers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/stargazers","contributors_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/contributors","subscribers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/subscribers","subscription_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/subscription","commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/contents/{+path}","compare_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/merges","archive_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/downloads","issues_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues{/number}","pulls_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls{/number}","milestones_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/milestones{/number}","notifications_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/labels{/name}","releases_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/releases{/id}","deployments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/deployments","created_at":"2013-11-26T00:59:05Z","updated_at":"2016-03-21T05:54:19Z","pushed_at":"2016-03-22T00:58:13Z","git_url":"git://github.com/AzureAD/azure-activedirectory-library-for-android.git","ssh_url":"git@github.com:AzureAD/azure-activedirectory-library-for-android.git","clone_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android.git","svn_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android","homepage":"http://www.windowsazure.com/en-us/services/active-directory/","size":23640,"stargazers_count":61,"watchers_count":61,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":62,"forks":49,"open_issues":62,"watchers":61,"default_branch":"master"}},"base":{"label":"AzureAD:dev","ref":"dev","sha":"fcdef894596cfb7239257e8669e09c0877683ed0","user":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"repo":{"id":14703238,"name":"azure-activedirectory-library-for-android","full_name":"AzureAD/azure-activedirectory-library-for-android","owner":{"login":"AzureAD","id":2966316,"avatar_url":"https://avatars.githubusercontent.com/u/2966316?v=3","gravatar_id":"","url":"https://api.github.com/users/AzureAD","html_url":"https://github.com/AzureAD","followers_url":"https://api.github.com/users/AzureAD/followers","following_url":"https://api.github.com/users/AzureAD/following{/other_user}","gists_url":"https://api.github.com/users/AzureAD/gists{/gist_id}","starred_url":"https://api.github.com/users/AzureAD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AzureAD/subscriptions","organizations_url":"https://api.github.com/users/AzureAD/orgs","repos_url":"https://api.github.com/users/AzureAD/repos","events_url":"https://api.github.com/users/AzureAD/events{/privacy}","received_events_url":"https://api.github.com/users/AzureAD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android","description":"The ADAL SDK for Android gives you the ability to add support for Work Accounts to your application with just a few lines of additional code. This SDK gives your application the full functionality of Microsoft Azure AD, including industry standard protocol support for OAuth2, Web API integration with user level consent, and two factor authentication support.","fork":false,"url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android","forks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/forks","keys_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/teams","hooks_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/hooks","issue_events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/events{/number}","events_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/events","assignees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/assignees{/user}","branches_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/branches{/branch}","tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/tags","blobs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/statuses/{sha}","languages_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/languages","stargazers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/stargazers","contributors_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/contributors","subscribers_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/subscribers","subscription_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/subscription","commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/contents/{+path}","compare_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/merges","archive_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/downloads","issues_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues{/number}","pulls_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls{/number}","milestones_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/milestones{/number}","notifications_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/labels{/name}","releases_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/releases{/id}","deployments_url":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/deployments","created_at":"2013-11-26T00:59:05Z","updated_at":"2016-03-21T05:54:19Z","pushed_at":"2016-03-22T00:58:13Z","git_url":"git://github.com/AzureAD/azure-activedirectory-library-for-android.git","ssh_url":"git@github.com:AzureAD/azure-activedirectory-library-for-android.git","clone_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android.git","svn_url":"https://github.com/AzureAD/azure-activedirectory-library-for-android","homepage":"http://www.windowsazure.com/en-us/services/active-directory/","size":23640,"stargazers_count":61,"watchers_count":61,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":62,"forks":49,"open_issues":62,"watchers":61,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550"},"html":{"href":"https://github.com/AzureAD/azure-activedirectory-library-for-android/pull/550"},"issue":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/550"},"comments":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/issues/550/comments"},"review_comments":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550/comments"},"review_comment":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/pulls/550/commits"},"statuses":{"href":"https://api.github.com/repos/AzureAD/azure-activedirectory-library-for-android/statuses/09b82cc91bcfe02fae2d635ee52cab4f18da2145"}}}}