2 Commits

Author SHA1 Message Date
8734abcc99 updating ms graph module 2026-05-11 20:47:40 -05:00
c66cfb3c9e switching user module to msgraph module (#15) 2025-11-16 09:28:06 -06:00
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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