From 8734abcc99ba8ed6d22f9f33f271090b32a131ca Mon Sep 17 00:00:00 2001 From: noahspannbauer Date: Mon, 11 May 2026 20:47:40 -0500 Subject: [PATCH] updating ms graph module --- libs/modules/src/msgraph/msgraph.interface.ts | 3 ++- libs/modules/src/msgraph/msgraph.service.ts | 4 ++-- package.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/modules/src/msgraph/msgraph.interface.ts b/libs/modules/src/msgraph/msgraph.interface.ts index c9d3aca..9e8f5e3 100644 --- a/libs/modules/src/msgraph/msgraph.interface.ts +++ b/libs/modules/src/msgraph/msgraph.interface.ts @@ -1,5 +1,6 @@ export interface MsGraphModuleOptions { - tenantId: string; + authority: string; clientId: string; clientSecret: string; + tenantId: string; } \ No newline at end of file diff --git a/libs/modules/src/msgraph/msgraph.service.ts b/libs/modules/src/msgraph/msgraph.service.ts index 77348d5..6e1df6d 100644 --- a/libs/modules/src/msgraph/msgraph.service.ts +++ b/libs/modules/src/msgraph/msgraph.service.ts @@ -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 { 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') diff --git a/package.json b/package.json index 154b0f2..44b52e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@noahspan/noahspan-modules", - "version": "1.2.8", + "version": "1.2.11", "description": "", "author": "", "license": "UNLICENSED",