updating ms graph module

This commit is contained in:
2026-05-11 20:47:40 -05:00
parent c66cfb3c9e
commit 8734abcc99
3 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
export interface MsGraphModuleOptions {
tenantId: string;
authority: string;
clientId: string;
clientSecret: string;
tenantId: string;
}

View File

@@ -18,7 +18,7 @@ export class MsGraphService {
auth: {
clientId: this.msGraphModuleOptions.clientId,
clientSecret: this.msGraphModuleOptions.clientSecret,
authority: `https://login.microsoftonline.com/${this.msGraphModuleOptions.tenantId}`
authority: this.msGraphModuleOptions.authority
}
});
const authenticationResult: AuthenticationResult = await cca.acquireTokenOnBehalfOf(oboRequest);
@@ -67,7 +67,7 @@ export class MsGraphService {
async searchUsers(accessToken, searchText: string): Promise<any> {
try {
const graphToken: string = await this.getMsGraphAuth(accessToken, ['user.read']);
const graphToken: string = await this.getMsGraphAuth(accessToken, ['user.read.all']);
const client: Client = await this.getMsGraphClientDelegated(graphToken);
const results: any = await client
.api('users')

View File

@@ -1,6 +1,6 @@
{
"name": "@noahspan/noahspan-modules",
"version": "1.2.8",
"version": "1.2.11",
"description": "",
"author": "",
"license": "UNLICENSED",