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
2answers
23 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
21 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
1answer
34 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
18 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
31 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
31 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
34 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
87 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
45 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
32 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
14 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
26 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
16 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
19 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
80 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
47 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
48 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
24 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
19 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
30 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
137 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
33 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
54 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
18 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
40 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
50 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
35 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
37 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" -...
1
vote
0answers
304 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
62 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 ...
0
votes
0answers
29 views

PnP JS Core : Uncaught (in promise): TypeError: Cannot read property of undefined

I am using PnP js in one of my angular 6 project. I have a function which is defined in the Component, but I am getting this error at run-time when calling from inside the success of PnP SP js: ...
0
votes
1answer
27 views

Can we allow the comment section (under All Replies >> Oldest) inside the “Discussion Board” list to show more than 20 replies on each page

We have added a Discussion Board list to our sharepoint online classic team site. Currently when we click on a discussion item, the main view (under All Replies >> Oldest) for each discussion will ...
0
votes
1answer
213 views

Invalid Command for o365 spo login CLI

I am setting Azure DevOps pipleline for my SharePoint framework project and followed below steps, https://social.technet.microsoft.com/wiki/contents/articles/52777.sharepoint-framework-how-to-...
0
votes
1answer
39 views

SPFx webpart with @pnp/spfx and Angular elements not working

I have created SPFx webpart for Angular Elements using below link: https://pnp.github.io/generator-spfx/howtos/angularelements/ Getting error in npm run bundle as below:
1
vote
1answer
90 views

SPFx Angular Elements with @pnp/spfx generator

How we can enable Angular elements in SPFx webpart using @pnp/spfx generator? Installed Versions: After "npm list -g --depth 0"
0
votes
0answers
39 views

Programmatically change a Date field

I have a form/web part where the user can edit columns. It works, but when the user needs to change value in a date column, it doesn't work. First I have the input form: <Calendar ...
1
vote
1answer
84 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: ...
0
votes
0answers
77 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 ...
0
votes
1answer
130 views

Can i get the total number of files,folders & size for a sharepoint online document library

Inside sharepoint (on-prem & on-line) we can get the total number of items inside a document library (this includes files and folders) from the site content page. but i have a document library ...
1
vote
1answer
120 views

Unable to hide a column in “NewForm” using PnP

Last week i was able to hide 2 site columns from New list form using this PnP script (the fields were of type Single line of text and Date/Time):- $User = "admin@****.onmicrosoft.com" $SiteURL = "...
1
vote
1answer
65 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
1answer
385 views

2016 - Upload multiple files with REST API and PNP [closed]

I'm developing a multiple files upload form on SharePoint 2016. My goal is to prevent duplicate files name, so my idea is to upload files in a document library, change a metadata of these files and ...
0
votes
1answer
53 views

How to use Filter property of SPOSitePropertiesEnumerableFilter class

I would like to know how "Filter" property can be use. This is a string value but I do not see any example anywhere on how to use this property. I would really appreciate if someone can share some ...
1
vote
2answers
30 views

Can not delete closed readonly site with SharePoint Online

I have a site which has site policy associated. based on my policy site is closed and marked as read-only. When I try to delete the site from Admin got an error "Couldn't delete site" One of the ...
0
votes
0answers
43 views

Can not delete site with AppOnly Permission

I am trying to delete the site with app only permissions. Below is my Provider Hosted app permissions <AppPermissionRequests AllowAppOnlyPolicy="true" > <AppPermissionRequest Scope="...
0
votes
0answers
75 views

Copy files/folders from OneDrive personal site to sharepoint online document library using PnP and preserve the files/folders' permissions

I was reading this article @ Copy a folder from one library to another and maintain permissions on the folder structure which shows how we can use power-shell commands to move files between SP on-...
0
votes
2answers
242 views

Create Hub Sites using CSOM C# in SharePoint Online

I want to create a new Hub site and associate some of the existing sites to the Hub site using CSOM C# in SharePoint Online. I know how to do this using the SharePoint Admin center. But I want to do ...
0
votes
0answers
49 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
votes
2answers
283 views

Apply-PnPProvisioningTemplate : The remote server returned an error: (403) Forbidden

I am developing a script to create/update group/team sites from a SharePoint list. I have everything working, but I am struggling big time with authentication. I use Connect-PnPOnline -Url https://...