2 Commits

Author SHA1 Message Date
dc860ee4c4 Merging main into switching-user-module 2025-11-16 09:27:49 -06:00
765c02c0a1 switching user module to msgraph module 2025-10-02 11:59:30 -05:00
3 changed files with 4 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
export interface MsGraphModuleOptions { export interface MsGraphModuleOptions {
authority: string; tenantId: 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: this.msGraphModuleOptions.authority authority: `https://login.microsoftonline.com/${this.msGraphModuleOptions.tenantId}`
} }
}); });
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.all']); const graphToken: string = await this.getMsGraphAuth(accessToken, ['user.read']);
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.11", "version": "1.2.8",
"description": "", "description": "",
"author": "", "author": "",
"license": "UNLICENSED", "license": "UNLICENSED",