Questions tagged [pnp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 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
11 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
2answers
75 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
1answer
616 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 =...
0
votes
0answers
20 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
44 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
27 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
604 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
38 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
39 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
67 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
14 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
24 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 ...
3
votes
1answer
42 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
31 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
21 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
1answer
85 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 ...
0
votes
0answers
21 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
70 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
0answers
21 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?
5
votes
3answers
831 views

PnPJS with on-prem sharepoint?

Is it possible to use https://github.com/pnp/pnpjs with on-premise SharePoint with an external NodeJS application? Installing web parts is not an option I must perform read-only access. If so, what ...
1
vote
0answers
35 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
22 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 ...
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
1answer
129 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
51 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
0answers
109 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 ...
0
votes
1answer
30 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. ...
12
votes
1answer
1k 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 ...
1
vote
1answer
106 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 = ...
5
votes
3answers
3k views

How to Provision a list with data using SharePoint Online PnP C#?

I have a custom list with few records in it. Now I am using PnP Provisioning Engine to provision the custom list to some other sites. By default, PnP is only provisioning the list structure and ...
0
votes
2answers
100 views

Setting default content type in Sharepoint Framework

I'm creating a list and then adding an existing content type to it. Is it possible to set the content type as default? Or would it be possible delete the primary content type? Here's my code. Thanks ...
1
vote
1answer
39 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
125 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
63 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
109 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
70 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
60 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:...
0
votes
0answers
50 views

Pnp ListView control filter by column

That's it Is possible to filter by columns? OOB the filter looks like a search tool but if I want to filter all items which date has passed then the OOB filter property doesn't help. Best regards ...
1
vote
1answer
325 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
61 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
39 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,...
0
votes
0answers
89 views

The type of data at position 1206 is different than the one expected

I am using below code to access site/web but keep getting "The type of data at position 1206 is different than the one expected." error. We have two separate tenants and getting this error in one of ...
0
votes
1answer
25 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 -...
0
votes
0answers
35 views

Sharepoint Multilookup Empty Field

I'm facing an issue with a multi lookup field while doing a REST API call using pnp-js. So I have this list (let's call it A) that looks up into another list (let's call it B) using a lookup field (...
2
votes
2answers
111 views

Pnp powershell asking credentials again and again

In PnP PowerShell for SharePoint 2013 site, how to give credentials only once, so that it will not ask credentials again while connecting to different site collections coming from a CSV file input. ...
0
votes
2answers
438 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 ...
0
votes
0answers
27 views

Logger registration failed. Falling back to TraceLogger

I am getting below error from PnP provisioning engine. Hoping to see if there is anyone who faced a similar issue and can help. 2019-02-20T23:41:13 PID[7340] Error 2019-02-20 23:41:13.6104 ...
3
votes
1answer
127 views

Get User's Time Zone using PnPJs

We are trying to retreive current user's profile Time Zone SPS-TimeZone from a SharePoint Framework webpart, but we are faicing an error (see below). Does anyone know about the best/most effecient way ...
0
votes
2answers
335 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 ...