Questions tagged [pnp]

The Offive Dev PnP is an open-source, community-driven initiative coordinated by SharePoint engineering. PnP includes development documentation, samples, reusable controls, and other relevant open-source initiatives related to SharePoint development that are closely involved with SharePoint engineering, but are not part of the official standard product or service offerings.

95 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13
votes
1answer
3k views

Creating modern team site takes long time to complete

I am creating modern team sites from managed code using PnP Unified Groups utility from PnP core with app-only permissions. This has been working just fine until recently. Now, the SharePoint site ...
5
votes
0answers
146 views

Sharepoint Online - site closure and deletion not working

We have used PnP to provision sites and add policies. But when the date for deletion has passed the site collection do not get deleted. This is standard SharePoint functionality.. so I have no idea ...
5
votes
0answers
540 views

How to provision the custom list form using PnP Provisioning Engine?

I am following this article for provisioning Sites for SharePoint Online through console application. Now, In the base site, I have created the custom list and a new custom list form for the list. I ...
3
votes
0answers
78 views

Composed look does not get applied to the new site collection using PnP Partner Pack

I create a site collection as I made some simple modifications like I applied a new composed look which is an OOTB one. I added two pages in the site pages library. I saved the site as a template ...
3
votes
0answers
41 views

PnP Provisioning engine apply same configuration to all lists of a certain tpye

As far as I can see from the PnP provisioning engine, each list instance needs to be specifically defined in the XML file. Is there a way that you can define one particular configuration to apply to ...
3
votes
0answers
345 views

How to set ListExperienceOptions with PnP-Poweshell

How do I set the ListExperienceOptions of a list to ClassicExperience using the PnP-Powershell? I have tried this # Create the list to hold work Types New-PNPList -Title "Work Types" -Url "...
3
votes
2answers
281 views

PnP-js-core Document form

Is there any example or guide to start using PnP-JS-core in the forms? Sharepoint Online. I've been looking for a while without luck!
3
votes
0answers
264 views

Adding view to a list content type - document set - SharePoint Online - PnP

I'm trying to add a view to a specific document set in a list. Fist I'm adding a the view to the list.. Add-SPOView -List "Demo List" -Title "Demo View" -Fields "Title","Address" But how do I add ...
2
votes
0answers
52 views

SPFx Command Bar not working after deployment

I am working on SPFx Command Bar and everything is working as expected when I do 'gulp serve' and run it in localhost. But when I tried to deploy the same in AppCatalog and installed the same to my ...
2
votes
1answer
662 views

PnP PowerShell - Get-PnPFile error checking if file exists

I'm trying to check if file already exists in a SPO document library using PnP PowerShell command. This is part of my PowerShell script: Try { #Get all Files from the source folder $...
2
votes
0answers
33 views

Working with npm packages in SharePoint hosted app

I am starting to work on a SP 2013 hosted app. I am planning to use typescript and have setup my project with Typescript configurations enabled. I have created a SP module called "dist" and all ...
2
votes
0answers
36 views

permissionKind returns void in React

I have a search function that returns all list items including their parent link based on their content type, tenant-wide. Every list item comes from a specific subsite and I want to split the ...
2
votes
0answers
106 views

Get all the site collections where Sharepoint app is instalation

In need of an approach how a user can identify whether an app is installed on the site collection or not. App can be a provider hosted or sharepoint hosted but site collection will be on office 365. ...
1
vote
0answers
26 views

Using PnP provisioning template and updating ExchangeId and IndexId JSON properties for a News web part

I'm using the PnP extension ApplyProvisioningTemplate to apply an XML site template as part of our provisioning process, a C# API running in Azure. One of the ClientSideWebPart we use is News. I have ...
1
vote
1answer
23 views

Working with adding attachment works fine on workbench but generated 404 error on site

While working with adding attachment to sharepoint works fine with workbench i.e.-https://sample.sharepoint.com/sites/Dev/_layouts/15/workbench.aspx but while deployed at sharepoint site it generates ...
1
vote
1answer
38 views

Adding Multiple Image file to folder not working

I am using pnp for adding files but its just adding one file only. I want to upload multiple Images files, and save it to the sharepoint folder. Using React with Typescript. <input type="file" ...
1
vote
0answers
29 views

PnP PowerShell - how to load all properties of a ClientObject?

Given a PnP cmdlet such as Get-PnPList there're a bunch of properties available but they're not populated upon executing the cmdlet. I'm looking for a way to load all of them, in a single call. I ...
1
vote
1answer
51 views

How to provision site assets with PnPProvisioningTemplate

I am trying to include company-wide images in my provisioning of Team sites in Sharepoint Online. I would use an organization asset library, but my Sharepoint topography is based on Hub sites with no ...
1
vote
2answers
85 views

Apply-PnPProvisioningTemplate : The specified user c:0t.c|tenant|5*****c could not be found

I want to copy a site collection from one tenant to another. insdie the source i run this command:- Get-PnPProvisioningTemplate -Out c:\template20.pnp -IncludeSiteCollectionTermGroup inside the ...
1
vote
2answers
300 views

Logic app deployment from DEV to PROD

I am new to Logic Apps so this might be a very basic question. Here is what I have done, I have created a very basic Logic App which will trigger when a new item is created in SharePoint List and ...
1
vote
2answers
45 views

Adding multiple or an array of values using Set-PnPPropertyBagValue

I would like to add an indexed property bag value to some of my SharePoint Sites that is called "former names". I would like to add multiple string values or an array of string values under the one ...
1
vote
1answer
210 views

PnP Modern Search - results differ from query builder test

Goal: Create a search solution that only searches one specific document library. Steps: Using the latest version of this SPFx solution found here: https://github.com/microsoft-search/pnp-modern-...
1
vote
1answer
37 views

PnP Provisioning Tenant how to migrate one tenant to another location

Is there a possibility to migrate all resources from one tenant to another? How Could we Migrate them to deploy from the testing environment to the production environment?
1
vote
1answer
167 views

SPFX 404 When Trying to Get Current User In Workbench

I'm trying to get the user context in my React webpart and am getting 404's when requesting: https://localhost:4321/_api/web/currentuser This is the part of the code that fetches the current user: ...
1
vote
1answer
142 views

to get last modified user of SharePoint Online default.aspx pages

I want to get the user name who has last modified default.aspx pages in SharePoint Online site. Only option is to use PnP powershell for SharePoint Online sites. e.g https://test.sharepoint.com/sites/...
1
vote
0answers
64 views

IE 11 error using Pnp.js for expand and

I have run into a consistent error, that only appears to be appearing on IE, where pnp.js will not expand or select any fields upon a function call. This naturally causes issues pnp.sp.web.lists....
1
vote
0answers
76 views

Make multiple File Upload with their respective fields using PNP JS

I have a picture library with 4-5 fields - Lets Take - Title(string), Date(Date), FlagOn(Boolean). I am trying to upload 10 files to my picture library and for all these 10 files i want the same ...
1
vote
1answer
365 views

Export Import Term Sets with PnP

I'd like to export a term set from one SP 2016 environment to another. I wanted to use this command: Export-PnPTaxonomy as in here: https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/...
1
vote
1answer
132 views

How many maximum number of sites will be returned from GetSitePropertiesFromSharePoint

I can find a number of articles on how to get all sites in SharePoint online and everyone referring to the below method https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/...
1
vote
0answers
27 views

Two search web parts on the same site not working (only in the same page)

I have two search web parts. The are based on each other, that is is that they pretty much does the same thing with some lesser tweaking. The have different product ID and alias. Only the code is ...
1
vote
1answer
193 views

How to set serverProcessedContent in a ClientSideWebPart

I'd like to add a file viewer web part to the home page of my online modern site via an SPFx Part. To try to make things easier, I have a fully configured file viewer part with an Excel file on a ...
1
vote
0answers
41 views

Taxonomy for Single line of text

I'm building a FAQ Accordion with SharePoint lists and I have the previous metadata working with TaxonomyFieldType but how do I target a single line of text? Column title: FAQKeywords ( Single line ...
1
vote
0answers
1k views

Using SP-PNP-JS to get data from custom content type fields with React

I'm currently making News Listing Web Part, where News are made as custom content type. I managed to get the basic fields like id, title, but others are really bothering me. The API fetches all the ...
1
vote
0answers
38 views

Responsive Lists in SharePoint 2016 (on prem)

I'm wondering if there is a nice way to make lists work with responsive design (for mobile and tablet views)? I've been investigating this responsive framework from PnP for general page content, but ...
1
vote
1answer
1k views

Disable Read Only SharePoint Content Types - Powershell

I use the PnP Commandlets to do much of my site building but cannot figure out how to make Site Content Types not read-only. There is no way to do this with commandlets so I'm looking for some help. ...
1
vote
0answers
329 views

Set field in Content Type to Hidden

How do I set fields in Content Type to hidden? This run below runs but the field didn't change. Also how can I specify which field I want to set? var x = function () { var listContentTypes; ...
1
vote
0answers
112 views

pnp update existing out of the box field

I have an xml document which contains a list of content types and fields. One currently contains a field that is out of the box, which I am wanting to change the default value of within this xml ...
1
vote
1answer
357 views

Add-PnPDataRowsToProvisioningTemplate : Object reference not set to an instance of an object

I have been trying to extract data using the new PnP command Add-PnPDataRowsToProvisioningTemplate But I am getting a null reference exception: Add-PnPDataRowsToProvisioningTemplate : Object ...
1
vote
1answer
204 views

Does Set-PnPFileCheckedIn.cs support folders?

I have a document which is two folders deep in a document library. When I try and use Set-PnPFileCheckedIn with a Url like "/Documents/Incorporation/Objections/incorporation objection.docx" I get an ...
1
vote
1answer
575 views

Get-PnPProvisioningTemplate User Groups and Workflows

In my today's SharePoint situation I need to replicate an website from a dev environment into another dev environment (without content, only structures). I have been looking to the Get-...
1
vote
0answers
695 views

PnP : Error in OfficeDevPnP.Core.dll : Object reference not set for ListProvisioning

Working on Sharepoint Online with PnP Provisioning Schema of 2015/12 (here). When provisioning my website with Libraries, I'm stepping into some error that i don't understand. What i have : a web ...
1
vote
1answer
260 views

PnP Partner Pack 2.0 - Value cannot be null. Parameter name: certificate

I am setting up the PnP Partner Pack 2.0 but getting an error 'Value cannot be null. Parameter name: certificate'. I have followed the all steps and made sure to avoid below possible errors. Can you ...
1
vote
1answer
675 views

How to publish a HTML pagelayout in pnp-Powershell?

I would like to publish a pagelayout html file with pnp-Powershell. This is a custom html pagelayout which is related to an aspx file. These files are stored in the masterpage gallery.
1
vote
1answer
202 views

Site Provisioning using SharePoint-hosted or Provider-hosted?

I have been reading the OfficeDevPnP for best practices on how to create Site Templates. The best practices recommend to use Remote Provisioning using Provider-Hosted App to create Custom Sites ...
1
vote
1answer
64 views

Project from PnP Office 365 not working

I have downloaded a project from PnP office 365, which is a SharePoint add-in to deploy stuff to host site, here's the project: https://github.com/OfficeDev/PnP/tree/master/Samples/Provisioning.Jsom ...
0
votes
0answers
7 views

[PnP][SharePoint] How to add a column to all content types of a list?

I have a list in SharePoint with 50 content types. My list has two columns that I want to add to each content type in my list using PNP library. Until now I have something like this: Add-PnPField -...
0
votes
1answer
35 views

PnP PeoplePicker not working on full names

Below is the PnP Peoplepicker control code that I'm using. The issue that I'm having here is with space-character within the name. Say I have valid user "Rachel Green". If I type-in "Rachel" I get 10 ...
0
votes
0answers
28 views

Customizing the PnP people search handlebar template in SharePoint online

I am using the modern PnP SPFx people search web part - and for the people search below is the out of the box template is generated by the web part: <content id="template"> <style> ...
0
votes
0answers
10 views

Is there any pnp script to get all site collection and user id, access level ,user email id,access level for sharepoint oniline

Need pnp powershell script to get all all site collection and user id, access level ,user email id,access level for sharepoint online
0
votes
1answer
15 views

Retention Policy for sub-sites

Is there a way to apply retention policies to sub-sites in SharePoint Online? Something with PowerShell PnP where we list the sub-site URL and policy target in Excel? We have looked at site ...