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