I need to find out the username or name of a principalId number that I'm returning from a REST call which get's role assignments currently on a SharePoint list item.
I understand it may involve:
const r = await sp.web.lists.getByTitle('MyList').items.getById(theItem).roleAssignments()
There is no documentation that explains how to do this that I have found.
Answered my own question again:
const assignments = await sp.web.lists.getByTitle('MyList').items.getById(theItem).roleAssignments(); const expanded = assignments[0].PrincipalId; console.log(expanded, 'expanded');
1.4m articles
1.4m replys
5 comments
56.9k users