pnp / pnpjs

Fluent JavaScript API for SharePoint and Microsoft Graph REST APIs
https://pnp.github.io/pnpjs/
Other
740 stars 300 forks source link

Graph API me/OwnedObjects is missing with pnp js 3.0 #3056

Closed ArunRajiv closed 1 month ago

ArunRajiv commented 1 month ago

What version of PnPjs library you are using

3.x

Minor Version Number

24.0

Target environment

SharePoint Framework

Additional environment details

I'm struggling to get the endpoint me/ownedObjects with pnp js graph. I found this method is missing with directoryObject. what is the way around to achieve this?

Question/Request

I'm struggling to get the endpoint me/ownedObjects with pnp js graph. I found this method is missing with directoryObject. what is the way around to achieve this? image

bcameron1231 commented 1 month ago

Hi. Take a look at our documentation for Calling Other Endpoints (endpoints that we currently don't have in the library).

https://pnp.github.io/pnpjs/concepts/calling-other-endpoints/

const user= graph.users.getById('jane@contoso.com');
const graphQueryable = GraphQueryable(user, "ownedObjects");
const ownedObjects = await graphGet(graphQueryable);
ArunRajiv commented 1 month ago

Thank you this was helpful :) I will try it out.

github-actions[bot] commented 1 month ago

This issue is locked for inactivity or age. If you have a related issue please open a new issue and reference this one. Closed issues are not tracked.