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
1answer
21 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
12 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
23 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
2answers
36 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
1answer
47 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-...
0
votes
1answer
16 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
16 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 ...
1
vote
1answer
24 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 ...
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
55 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
25 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
48 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
160 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 ...
0
votes
1answer
31 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
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
30 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 "...
0
votes
1answer
64 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 ...
1
vote
2answers
77 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 ...
0
votes
2answers
127 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=...
1
vote
1answer
28 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!
1
vote
2answers
41 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 ...
0
votes
2answers
30 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
56 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
74 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
180 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 $...
0
votes
2answers
117 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 ...
1
vote
1answer
151 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-...
0
votes
1answer
35 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 ...
1
vote
1answer
25 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?
2
votes
0answers
39 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 ...
0
votes
1answer
23 views

How can create a ListView Command with SPFx dynamically for several lists

I have created a listview Command for a specific list, "pageUrl": "https://contoso.sharepoint.com/sites/mySite/Lists/ListCommand/AllItems.aspx". It works fine, but is it possible to create it ...
0
votes
0answers
32 views

PnP SPFx generator - Angular Elements and live change

I have been doing some tests with the Angular Element SharePoint Online Web Part project template generated by the @pnp/generator-spfx Yeoman generator (see here) to evaluate its usage for a small ...
0
votes
0answers
12 views

Does the SP.ResponsiveUI (PnP) works for publishing pages

I have been using the pnp -SP.ResponsiveUI to apply responsive to sharepoint sites and pages but it seems to work for only sitepages. Does it work for publishing pages? If not how can i make it work. ...
0
votes
2answers
451 views

New-PnPSite - Check if site is allready created?

# CREATE COMMUNICATION SITE New-PnPSite ` -Type CommunicationSite ` -Title $team ` -Url ("https://hiddenforsecurity.sharepoint.com/sites/" + $team) ` -SiteDesign 'Blank' I need to wrap this ...
0
votes
3answers
149 views

Add-PnPView - Sort by Ascending order?

# CREATE VIEW QUERY $Query="<OrderBy><FieldRef Name='Name' Ascending='TRUE'/></OrderBy>" # CREATE VIEWS FOR PLAYER BIO Add-PnPView ` -List 'Player Bios' ` -Title 'All Players' ` ...
0
votes
1answer
122 views

Add-PnPField how to set it to be a required field?

# CREATES NEW FIELDS FOR PLAYER BIO CONTENT TYPE Add-PnPField ` -DisplayName 'Squad Number' ` -InternalName SquadNumber ` -Type Number ` -Required:$true ` -Group 'Football Content Types' I ...
1
vote
1answer
37 views

Using proxy with pnp-auth in Node.js [closed]

Question : Using pnp-aut and node-sp-auth-config, how can I specify the use of a proxy Context : Connect from within a Node.js app running on a server 'A' connecting to SharePoint on premise 'S' ...
0
votes
0answers
21 views

ListItemAllFields - Need values from another list for a file

I am using a PnP library to connect to SharePoint. This gets me all the files in a folder: $list->getRootFolder()->getFiles()->expand('ListItemAllFields'); I get all custom fields of the ...
0
votes
1answer
32 views

Content Type Hub in SharePoint Online

I have used Content Type Hub in On Premises and haven't had much issues but with online it's very difficult to use. What I am seeing is, when we create a new site content type doesn't show up ...
0
votes
1answer
494 views

How to get all files and other custom field from document library in pnpjs sharepoint online?

I have a document library named FileUpload. Another folder named FileInfoes inside the FileUpload. FileUpload(Document Library) -----FileInfoes(Folder) -----------Name -----------...
0
votes
0answers
71 views

Access Denied while retrieving Get-PnPProvisioningTemplate

I am using modern authentication to extract pnp provisioning template from modern sharepoint site online. But I am unable to retrieve and getting Access Denied exception. Tried in Google but no luck. ...
0
votes
2answers
126 views

SharePoint PnP - Get-PnPField - Only Columns visible to Super User

When using Get-PnPField, is there a way to only pull fields that are available for editing the settings GUI? Get-PnPField pulls all the fields including some system-related.
0
votes
0answers
20 views

GraphAPI with SharePoint lists CRUD including attachments

I wanted to create SPFx solution with below scenario I want to give all users readonly access at site, lists level I want to create a SPFx webpart which will add data to the lists (includes adding ...
1
vote
1answer
50 views

node js -> Sharepoint behind proxy

The situation: Node Express.js app connects to SharePoint via pnp.js (REST) this app MUST route through a proxy Question: How can I force the node express.js app to use the proxy ? In powershell: ...
0
votes
2answers
54 views

Add External users to SharePoint User Group

I have created Html form with Email,Name etc. Accordingly form details i want to add user in SharePoint Site Group. Thanks in advance.
1
vote
1answer
62 views

Configure App using CSOM c#

I am able to install/deploy an app to a sharepoint site using the code below var appManager = new AppManager(context); var apps = appManager.GetAvailable(); var foundApp = apps.Where(a => a.Id == ...
0
votes
0answers
76 views

PnP - Apply-PnPProvisioningTemplate restoring data from wrong list

I'm using the latest release of PnP PowerShell for SharePoint Online. I'm also creating a Provisioning Template using this command: Get-PnPProvisioningTemplate -Out "C:\templates\mylist.pnp" -...
2
votes
1answer
504 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
167 views

Add new list item using pnp/sp

I have an SPFX client web part that opens a dialog box containing a couple of textboxes, and when the user clicks Ok, I want the contents of that dialog box added to a list as a new list item. The ...

1
2 3 4 5