updating ms graph module
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
export interface MsGraphModuleOptions {
|
export interface MsGraphModuleOptions {
|
||||||
tenantId: string;
|
authority: string;
|
||||||
clientId: string;
|
clientId: string;
|
||||||
clientSecret: string;
|
clientSecret: string;
|
||||||
|
tenantId: string;
|
||||||
}
|
}
|
||||||
@@ -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')
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user