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.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 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 -...
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 ...
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
675 views

Sharepoint O365 pnp js get all users

I know this has been asked several times but I haven't found a viable solution. I am building a spfx webpart where I want to display every single user with name, title, email etc. I am using the pnp-...
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 ...
0
votes
1answer
313 views

Unable to grab files inside folders on SharePoint using PnP js

Does anyone have some reference on why I'm unable to pull in files from a folder in SharePoint? This is what I have so far, this will be my PnP js call (I don't I'm not doing something right) <...
0
votes
1answer
1k views

Updating sharepoint list items with batch pnp, in bad request

I've used this guide to create my batch and update the items. var list = pnp.sp.web.lists.getByTitle("Categories"); list.getListItemEntityTypeFullName().then(entityTypeFullName => { var batch =...
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 ...
0
votes
2answers
679 views

Remote event receiver not firing (SharePoint Online)

I have downloaded the PnP sample project ECM.AutoTagging and have configured an azure service bus for debugging, have created new client id/token and updated the app manifest/web.config and so on. I ...
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
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 ...
0
votes
0answers
16 views

Set-PnPTraceLog with Azure PowerShell Function

Thre are lots of post regarding how to use PnP with Azure PowerShell Function below are few links https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-...
0
votes
0answers
28 views

Get list items from a site collection in different Geo location using REST API in SPFx

I'm trying to get list items from a different Geo-location within the same tenant in an SPFx solution. I've tried pnp-js, spHttpClient, etc and end up getting 403. Is there a way to achieve this?
1
vote
1answer
59 views

Get-PnPProvisioningTemplate with -IncludeSiteCollectionTermGroup, how will it work if i Apply the template to the same tenanat and to a new tenant

I am reading about the Get-PnPProvisioningTemplate -Out template.pnp -IncludeSiteCollectionTermGroup from this link https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-...
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 ...
0
votes
1answer
34 views

Get-PnPProvisioningTemplate return this error Get-PnPProvisioningTemplate : Maximum retry attempts 10, has be attempted

I have a communication site collection inside our SharePoint online tenant. and i want to export this site and create a new site based on the exported template, so i run this command:- Connect-...
0
votes
0answers
17 views

Can we batch API calls if they're wrapped in custom functions?

I have this method and I am wondering if we can batch the API calls. I am not sure if it's possible, because I am using a wrapper function that contains the pnp API functions. Is there a way to do ...
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 $...
0
votes
1answer
138 views

Parameters in PnP template in JsonControlData property

I tried to provision a modern site with a people web part. The configuration of this web part is mainly stored in a property called JsonControlData. I would like to know how to properly add ...
1
vote
1answer
27 views

PnP site template - include 'Embed' webpart with <iframe>

I am provisioning sharepoint sites using a pnp site template and would like to add an embed web part. I am able to add 'people' web parts with the following: <pnp:CanvasControl ...
0
votes
1answer
98 views

pnp schema template issue - how to inlcude “new and existing guests” option in the schema

I am not finding the right XML schema to include it in my PNP provisioning template. How can I include settings called "New and existing guests" for external sharing while provisioning a site using ...
2
votes
1answer
29 views

Is there a way to get the json content of files fetched through a CAML query?

const query = `<Where> <Eq><FieldRef Name="File_x0020_Type"/> <Value Type="Text">json</Value> </Eq> </Where>`; const xml = '<View ...
0
votes
1answer
192 views

Retrieve data from SharePoint list via PnP JS and CAML Query

I wanted to display all files which have the property" Job" = "Job1" how to retrieve list view items using PnP JS and CAML Query here is the CAML Query ? <ViewFields> <FieldRef Name='...
2
votes
1answer
19 views

SP PnP - Syntax error encountered while updating existing file metadata

Albeit a newbie, I'm stumped that something this simple is causing an issue. I have a document in a document library in SPO that for which I'm trying to update 4 metadata attributes. Here is my syntax ...
1
vote
1answer
47 views

How to get items from SP list using query and @pnp/sp and Filtering

I have a getItems function that accepts a filter, but I need to know how to pass in two different filters so that I can retrieve items filtered by both Age and First Name. Here is the definition of ...
0
votes
1answer
66 views

Unable to remove a Remote Event Receiver attached to a list using Remove-PnPEventReceiver .Erro “emove-PnPEventReceiver : Access denied.”

I have a remote event receiver which is attached to a list. so i want to remove it, but when i try this PnP script using the Office 365 admin:- Remove-PnPEventReceiver -List "Our Project" -Identity "...
3
votes
3answers
279 views

Can i save a list as template using PnP script inside my modern communication site

I am working on a communication modern SharePoint site. and seems these modern sites, do not allow us to save the list as template. as i want to save our list as template and re-create it inside ...
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. ...
0
votes
1answer
32 views

Sharepoint search in library

We are using the PnP modern search web-parts but we get no results when searching on a one of our sites. Settings are OK, Searchable, Re-indexed, documents are primary versions. On other sites (same ...
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
1answer
18 views

Get all onedrives from c#

I am looking for a c# snippet for getting all OneDrive's. There is a lot of sample for PowerShell, but I am looking for c# snippet that can provide all OneDrives in a tenant.
0
votes
0answers
37 views

Unable to remove a Remote Event Receiver attached to a list using Remove-PnPEventReceiver

I have a remote event receiver which is attached to a list. so i want to remove it, but when i try this PnP script using the Office 365 admin:- Remove-PnPEventReceiver -List "Our Project" -Identity "...
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
33 views

Can I set List Validation Settings programmatically?

I want to set the Validation Settings of a List with PnPJS. Is this possible? alternatively: Is it possible to provision a List with specific Validation Settings in place? Thanks!
0
votes
2answers
224 views

I am using pnp peoplepicker in spfx and I want to clear the selected value by user on this people picker by code

Here is the people picker I am using within my component's Render: <PeoplePicker context={this.props.context} titleText="" personSelectionLimit={1} groupName={""} showtooltip={true} selectedItems=...
0
votes
2answers
49 views

Submit-PnPSearchQuery Finding person or group

We have several Person or Group fields with users in them. We need to write a query that will find all content where that field contains a specific user. The following queries are returning 0 ...
0
votes
2answers
127 views

Can i update the enterprise wiki pages' content type and page layout using PnP, without affecting the pages' metadata

I have migrated an old enterprise wiki site collection 2013 to SharePoint online. I did not create the source site collection, and i found that the wiki pages are associated with the built-in ...
0
votes
2answers
86 views

What is the PnP Equivalent of Set-SPOSiteGroup

I'm trying to programmatically change the default permission level from Edit to Contribute on the Members group. connect-sposervice https://<tenant>-admin.sharepoint.com Set-SPOSiteGroup -...
1
vote
1answer
112 views

Error retrieving items from large list, although the CAML query has a row limit

I'm able to use a console application to connect to a SharePoint Online large list (more than 5,000 items) and retrieve the title. However, even though my CAML query has a row limit, I still get an ...
0
votes
0answers
268 views

PnP SharePoint Powershell command throws exception

We are using PnP powershell which works as expected. However, sometimes we face an exception intermittently with the error as given below. The PnP powershell script line is Connect-PnPOnline -Url $...
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
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-...
4
votes
2answers
3k views

How to add Folders into Document Library using PnP Provisioning Template

I'm using PnP GetProvisioningTemplate() method to create Provisioning Template from existing site(have some document libraries with folders and files) and applying to newly created sites, using ...
0
votes
1answer
40 views

Share a folder with external use using PnP

I am trying to share a folder with an external user, I get the URL of the folder on console.log. But how can I send it directly to the user? This code shares a file with an external user, but it ...
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 ...

1
2 3 4 5