mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-20 18:23:13 +00:00
UserSelectParams for Azure AD
This commit is contained in:
@@ -20,6 +20,7 @@ import { LogService } from 'jslib/abstractions/log.service';
|
|||||||
const NextLink = '@odata.nextLink';
|
const NextLink = '@odata.nextLink';
|
||||||
const DeltaLink = '@odata.deltaLink';
|
const DeltaLink = '@odata.deltaLink';
|
||||||
const ObjectType = '@odata.type';
|
const ObjectType = '@odata.type';
|
||||||
|
const UserSelectParams = '?$select=id,mail,userPrincipalName,displayName,accountEnabled';
|
||||||
|
|
||||||
enum UserSetType {
|
enum UserSetType {
|
||||||
IncludeUser,
|
IncludeUser,
|
||||||
@@ -78,7 +79,7 @@ export class AzureDirectoryService extends BaseDirectoryService implements Direc
|
|||||||
private async getCurrentUsers(): Promise<UserEntry[]> {
|
private async getCurrentUsers(): Promise<UserEntry[]> {
|
||||||
const entryIds = new Set<string>();
|
const entryIds = new Set<string>();
|
||||||
const entries: UserEntry[] = [];
|
const entries: UserEntry[] = [];
|
||||||
const userReq = this.client.api('/users');
|
const userReq = this.client.api('/users' + UserSelectParams);
|
||||||
let res = await userReq.get();
|
let res = await userReq.get();
|
||||||
const setFilter = this.createCustomUserSet(this.syncConfig.userFilter);
|
const setFilter = this.createCustomUserSet(this.syncConfig.userFilter);
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -130,7 +131,7 @@ export class AzureDirectoryService extends BaseDirectoryService implements Direc
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res == null) {
|
if (res == null) {
|
||||||
const userReq = this.client.api('/users/delta');
|
const userReq = this.client.api('/users/delta' + UserSelectParams);
|
||||||
res = await userReq.get();
|
res = await userReq.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user