How get team site groupId property from a SPFX webpart with pnp/js
-
08-02-2021 - |
Question
I create a webpart with SPFX and it is deployed in a team site. I need get the team site groupId property.
Solution
I finally got the groupId
with the following code:
sp.web.select("AllProperties").expand("AllProperties").get().then(w => {
console.log(w.AllProperties.RelatedGroupId);
});
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange