-2

I am trying to set up a CRM solution using SharePoint and Office 365, i want to get all the user details from graph api, how do i achieve it using @pnp/js. We were using an office 365 crm before, which had this specific feature that allowed to view all the users from the solution, so im trying to develop something like that. Can anyone help me on this?

1 Answer 1

0

There is @pnp/graph/users could be used with SPFx solution.

https://pnp.github.io/pnpjs/graph/users/

import { graph } from "@pnp/graph";
import "@pnp/graph/users";

const matchingUser = await graph.users.getById('[email protected]')();

Configure the API permissions requests

Install the libraries in SPFx project.

npm install @pnp/logging @pnp/common @pnp/odata @pnp/graph --save

SPFx guideline

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.