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
98 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
177 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
23 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
53 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
56 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
73 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
91 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
665 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
221 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
102 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
31 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
296 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
64 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:
2
votes
1answer
183 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
49 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
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: ...
0
votes
1answer
139 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
656 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
216 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
143 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
578 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
101 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
50 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
54 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
97 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
404 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 ...
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
votes
2answers
537 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://...
0
votes
1answer
376 views

Connect-PnPOnline -PnPO365ManagementShell

I am trying to connect to PnPOnline using the following Connect-PnPOnline -Url https://Company.sharepoint.com/sites/testclientsite -PnPO365ManagementShell -LaunchBrowser After authenticating through ...
3
votes
1answer
365 views

PnPJS - MS Graph API - how to get group photo

I am using PnPJS for MS Graph API to retrieve groups information in SPFx solution. I am able to get the groups information properly. I need to get the group photo also, since photo is not available ...
0
votes
0answers
114 views

Create document set with pnp.js api

I want to create a document set using the pnp.js api. How are you meant to do that?
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 ...
0
votes
0answers
32 views

Can I change the site homepage within a Site Design script?

I've created a site design based on a number of scripts in PowerShell (via Add-SPOSiteScript -> Add-SPOSiteDesign). This creates a design with a number of lists & views, and adds URLs to those ...
2
votes
1answer
1k views

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

I use spfx in version 1.8.2 and I use @pnp/sp already to fetch views, but this gives me only properities of views, but I need items of list with are visible on sharepoint list in those views. sp.web....
0
votes
1answer
630 views

Get another user info using PnPJS with SPFx

I want to get a list of items from a SharePoint list, and display them in a specific way in SPFx webpart. I could use PnPJS to get Text and Number fields, but for the Author field, I am only getting ...
0
votes
1answer
252 views

CSOM: Unable to update or create content type - Value cannot be null. Parameter name: s

When creating or updating content types using PnP/CSOM we are encountering the following error upon executing the query: Microsoft.SharePoint.Client.ServerException: Value cannot be null. ...
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/...
0
votes
1answer
504 views

react-search: The type definition `index.d.ts` does not exist. Create one and try again

I am new to SharePoint and I'm trying to deploy a modern Search Web Part following the instructions here sp-dev-fx-webparts/samples/react-search/ When I run tsd install on the command prompt, it ...
1
vote
1answer
378 views

Adding a listview web part - modern team sites

I need to add a list view web part with c# like below: My best guess is using PnP is the wat to go. I would think something like below is the first part (correct me if I am wrong): var page = ...
1
vote
1answer
285 views

@pnp/sp - send email function returns 404

Just wondering if I could get some help. I built a small webpart that sends an email. On my local workbench it works fine however when I deploy to production Error: Error making HttpClient request ...
0
votes
1answer
396 views

New-PnPTerm : Specified argument was out of the range of valid values

I want to create a new term using PnP for our sharepoint online tenant, so i tried this PnP script:- PS C:\Windows> Connect-PnPOnline -Url https://****-admin.sharepoint.com PS C:\Windows> New-...
2
votes
2answers
152 views

Migrate a term from sharepoint on-premises to sharepoint online, to have same name & GUID

I have 2 farms sharepoint on-premises 2013 & sharepoint online. where we use to have a license for a third part migration tool, and we have migrated around 70% of the sites, but still the ...
1
vote
1answer
197 views

How to test PNP using JEST?

Is there any way to mock the context of the webpart since i need it to be able to make a request through pnp ?
0
votes
1answer
182 views

When fetching list's items the link of title column is missing

I wrote a spfx web part using sp-pnp-js to fetch items from a list, this is my query to the list: public async getAgreements(): Promise<Agreement[]> { let select = '*'; let Agreements:...
1
vote
1answer
1k views

Update a site column Display name using PnP, to allow me to use existing Display Name

I am working on sharepoint online classic team site and i created a new site column using the site columns UI, as follow:- where the site column gets its display name and internal name as "...
0
votes
1answer
193 views

Set defaultvalue of sp-pnp-js created boolean field

I'm unable to set the default value to false of my boolean field called Done pnp.sp.web.lists.add("Todo","").then(() => { pnp.sp.web.lists.getByTitle("Todo").fields.add("Done","SP.FieldText",{ ...
1
vote
1answer
325 views

Can I use PnP PowerShell to set Conditional Access Policy on individual sites?

Using SharePoint Online Management Shell and Set-SPOSite I can set the Conditional Access Policy on individual OneDrive sites. Is it possible to do the same thing with PnP PowerShell? I can only find ...
1
vote
1answer
91 views

PnPjs alternatives for .NET

For developing with the SharePoint REST APIs using JavaScript I always use PnPjs because it's an easy way of getting data from SP. PnPjs is a collection of fluent libraries for consuming SharePoint,...
1
vote
1answer
36 views

provide a SPOSiteDesign from XML instead of JSON

Is there a way to provide a modern ui site template based on an XML file? This doesn't seem to work. $site_script = Get-Content -Path "./siteTemplate1.xml" -Raw $SiteScript = Add-SPOSiteScript -...
1
vote
2answers
2k views

How to clear Office-ui-fabric-react fields after object has been added to list?

I have a simple list that gathers info from two text fields, a drop down and a people picker. I am able to submit to my custom list. I have set the state back to the defaultValue, which I have defined ...