Skip to main content
10 votes
Accepted

How get sharepoint list items by view(s) in spfx?

I am afraid you can't get items directly from view. You will get viewQuery field from below method using v.ViewQuery. then you have to use getItemsByCAMLQuery method to get items. Below are reference ...
Siddharth Vaghasia's user avatar
7 votes
Accepted

How should I update the Office SharePoint PnP PowerShell Commands?

It's ok to uninstall and install it again, because they are simply copying files into the file system. Actually uninstalling is not required, but just to make sure that everything is fresh and in a ...
Sergei Sergeev's user avatar
7 votes
Accepted

PnP-JS-Core Property bags

You need to use it as below in typescript: pnp.Web(this.url).select("Title", "AllProperties").expand("AllProperties").get().then(r =>{ console.log(r); }); So pure javascript would be as ...
Gautam Sheth's user avatar
  • 30.9k
7 votes

How to Provision a list with data using SharePoint Online PnP C#?

I have done a similar thing recently and have written an article about it. You can easily achieve this by running some SharePoint PowerShell commands. Connect-SPOService -Url https://yoursharepoint-...
Sibeesh Venu's user avatar
6 votes

How to use the patterns and practices

You're absolutely right about documentation. IMHO, documentation is the weakest part of the PnP library. They did a lot of cool things in the library, but without good documentation is extremely hard ...
Sergei Sergeev's user avatar
6 votes

How to Provision a list with data using SharePoint Online PnP C#?

i managed to do this by adding rows as XML, a alternative option for some scenarios, perhaps? <pnp:Lists> <pnp:ListInstance Title="bookings" Description="bookings list demo" TemplateType="...
tristian o'brien's user avatar
6 votes
Accepted

PnPJS with on-prem sharepoint?

It is indeed possible to use PnP JS with SP OnPremise. It supports both 2013 and 2016 as well as the upcoming 2019 environment. Under the hood, it is just a wrapper over the existing REST API ...
Gautam Sheth's user avatar
  • 30.9k
6 votes

PnPJS with on-prem sharepoint?

UPDATE JUNE 2019: Some things were changed in regards to PnPjs library and nodejs integration. Please read below updated guidance on how to use it with on-prem SharePoint and Nodejs: mkdir pnp_test ...
Sergei Sergeev's user avatar
5 votes
Accepted

OfficeDevPnP.Core AuthenticationManager GetAppOnlyAuthenticatedContext is throwing error

Your are aboslutely right about ClientSecret is not necessary for high-trust apps. Unfortunately GetAppOnlyAuthenticatedContext works only with low-trust apps and uses AzureACS in order to obtain ...
Sergei Sergeev's user avatar
5 votes
Accepted

sharepoint framework and pnp

The SharePoint Framework (SPFx) is a page and part model that enables client-side development for building SharePoint experiences. It facilitates easy integration with the SharePoint data, and ...
Mohamed El-Qassas MVP's user avatar
5 votes
Accepted

How to Provision a list with data using SharePoint Online PnP C#?

This is by design. PnP will only migrate the structure and content types and not data. To provision the data, you will need to write a custom extensibility provider. You need to write that in your ...
Gautam Sheth's user avatar
  • 30.9k
5 votes
Accepted

PNP JS in SharePoint

For me the answer is pretty obvious: for sure you should use it. A few things why I think so: the learning curve is very straightforward and not so difficult pnpjs is a wrapper on REST API, by ...
Sergei Sergeev's user avatar
5 votes
Accepted

Unable to pull in Number/Lookup Columns using pnp.js

Change this part: table.append(`<td>${item.Title}</td>`); table.append(`<td>${item.Rank}</td>`); table.append(`<td>${item.Franchises}</td>`) to this: table....
Damjan Tomic's user avatar
  • 3,656
4 votes

sharepoint framework and pnp

SharePoint Framework (SPFx) is something completely new and it doesn't have direct relations to pnp and CSOM (besides some guys from PnP team involved into SPFx program too). SPFx is a new page and ...
Sergei Sergeev's user avatar
4 votes
Accepted

Can I get a list/library's Relative URL using PnP when I have its ID?

You need to expand the RootFolder property of a list. Modify your code as from below sample code : sp.web.lists.getById([THE ID]).select("Title","RootFolder/ServerRelativeUrl") .expand("RootFolder")....
Gautam Sheth's user avatar
  • 30.9k
4 votes

PnPJS - Check if site collection exists

You can check whether site collection exists or not as below: 1) Add the below import statement, we will be using the SPHttpClient provided by PnPJS to make a REST call to /_api/SP.Site.Exists ...
Gautam Sheth's user avatar
  • 30.9k
4 votes
Accepted

Can i using PnP script Update our custom list items "Status" field without affecting the ModifiedBy and Modifed fields

Yes, you can use Get-PnPListItem with CAML query to fetch the based on your conditions and then update them using Set-PnPListItem and passing the SystemUpdate parameter which wont change the modified ...
Gautam Sheth's user avatar
  • 30.9k
4 votes

New-PnPSite - Check if site is allready created?

You can use the Get-PnPTenantSite command to check if a site collection exists or not as below: $site = "" Try { Write-Host "Checking, if site already exists..." $site = Get-PnPTenantSite -...
Gautam Sheth's user avatar
  • 30.9k
3 votes
Accepted

Sharepoint Online upload files to library with PnP-JS-Core 2.0.7

You can try the below approach using the FileReader API : Assume that you have html structure somewhat as mentioned below: <input type="file" id="uploadFile" value="Upload File" /> <input ...
Gautam Sheth's user avatar
  • 30.9k
3 votes
Accepted

Does AnyOne Know how to Debug SharePointPnP.PowerShell

Copy your build output into the Program Files directory for the module version you have installed, usually found here: C:\Program Files\WindowsPowerShell\Modules That should make the runtime to load ...
James Love's user avatar
  • 25.5k
3 votes
Accepted

Sharepoint PNP Get Page Content

I'm faced the same issue few months ago. According to the Office PnP source code, that behavior is not implemented (Ref: ObjectPageContents.cs). You have to extract yourself pages and their contents ...
Vladimir Herrlein's user avatar
3 votes
Accepted

understanding set-pnplistitempermission

By list item object, it means passing the Microsoft.SharePoint.Client.ListItem object. You are currently passing string which will not work. You need to use Get-PnPListItem to get the list item and ...
Gautam Sheth's user avatar
  • 30.9k
3 votes
Accepted

Create Modern Team site using PnP Core - Invalid value specified for property 'mailNickname' of resource 'Group'

Creating a modern team site also creates unified group in Office365 that is associated with the newly created team site. The PnP package takes care of this but under the hood it seems that alias name ...
Vineet Desai's user avatar
3 votes
Accepted

How to configure SPO to do app-only auth with PFX private key?

About the GetAppOnlyAuthenticatedContext method, an easier way to register for an app id and app secret is by registering an app (add-in) in SharePoint Online itself. This article should give more ...
Vardhaman Deshpande's user avatar
3 votes
Accepted

Sharepoint O365 pnp js get all users

As far as I know there is no way to get all users using the REST API. When I've needed to do this I've instead used the Microsoft Graph. https://graph.microsoft.com/v1.0/users You will get a ...
Rob Windsor's user avatar
  • 12.7k
3 votes
Accepted

Alternative PnP commands to SharePoint Online Commands

Please see below, You can get the complete list of PNP commands here Connect-SPOService = Connect-PnPOnline Disconnect-SPOService = Disconnect-PnPOnline Set-SPOUser = nothing equal for it. Set-...
Waqas Sarwar MVP's user avatar
  • 56.9k
3 votes
Accepted

SharePoint List to HTML Table to TableExport.js

Your table HTML is not valid since you are appending table related tags just one after one. Plus, you should put your closing tbody tag after the loop. table.append(`<tr><td>${item.Title}&...
Salah's user avatar
  • 364
3 votes
Accepted

Retrieve column value (page property) by site ID from Site Pages list

You are on the right track. Based on the code that you posted in the question, am assuming that you are using pnpjs. Using that, we can get the page properties as below: pnp.sp.web.lists.getById(...
Gautam Sheth's user avatar
  • 30.9k
3 votes

@pnp/sp - send email function returns 404

Sorry, stupidity on my part. Correct code is: sp.setup({ spfxContext: this.props.context });
Lori's user avatar
  • 143
3 votes
Accepted

Create Hub Sites using CSOM C# in SharePoint Online

To register a site as Hubsite, you can use the below code: string tenantAdminSiteUrl = "https://tenant-admin.sharepoint.com/"; string userName = "[email protected]"; string password = ...
Gautam Sheth's user avatar
  • 30.9k

Only top scored, non community-wiki answers of a minimum length are eligible