diff --git a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts index 12e377d5510..667b02954c4 100644 --- a/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts +++ b/src/vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService.ts @@ -195,9 +195,9 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat this.updateAuthenticationProviders(); const allAccounts: Map = new Map(); - for (const { id } of this.authenticationProviders) { + for (const { id, scopes } of this.authenticationProviders) { this.logService.trace('Settings Sync: Getting accounts for', id); - const accounts = await this.getAccounts(id); + const accounts = await this.getAccounts(id, scopes); allAccounts.set(id, accounts); this.logService.trace('Settings Sync: Updated accounts for', id); } @@ -208,11 +208,11 @@ export class UserDataSyncWorkbenchService extends Disposable implements IUserDat this.updateAccountStatus(current ? AccountStatus.Available : AccountStatus.Unavailable); } - private async getAccounts(authenticationProviderId: string): Promise { + private async getAccounts(authenticationProviderId: string, scopes: string[]): Promise { let accounts: Map = new Map(); let currentAccount: UserDataSyncAccount | null = null; - const sessions = await this.authenticationService.getSessions(authenticationProviderId) || []; + const sessions = await this.authenticationService.getSessions(authenticationProviderId, scopes) || []; for (const session of sessions) { const account: UserDataSyncAccount = new UserDataSyncAccount(authenticationProviderId, session); accounts.set(account.accountName, account);