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
0 answers
6 views

SharePoint ServerUnauthorizedAccessException: 'Attempted to perform an unauthorized operation.'

i cannot load Web from SPO using Context.ExecuteQueryAsync, i receive alayws the same error Microsoft.SharePoint.Client.ServerUnauthorizedAccessException: 'Access is denied. (Exception from HRESULT: ...
tounsi amir's user avatar
0 votes
0 answers
13 views

Get a SharePoint list item using custom field inside my PnP Core SDK console application

I have a PnP Core Sdk console application, and I have a SharePoint list titled as "System Setting and Configuration", and it has a field named "SettingReferecne" & "...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
8 views

PnP JS - getShareLink is not working for PDF files

const result: IShareLinkResponse = await sp.web .getFolderByServerRelativePath(documentUrl) .getShareLink(sharingLinkKind); I am using this to generate shareable link with ...
Aaro Oral's user avatar
0 votes
0 answers
14 views

Question about SharePoint PnP Search Results web part

I would like in the PnP Search Results web part the query of {SearchTerms} to be to show only the accounts that has no period in it. Is that possible? If so what do I have to change to: {SearchTerms} ...
user1903995's user avatar
0 votes
0 answers
13 views

Pnp Rich Text Editor resizes automatically. How did I stop it from doing this?

I am using the pnp rich text editor. The textbox resizes itself automatically to accommodate the amount of characters in the text box. If there are too many characters, the textbox grows in size. How ...
Java Uzumaki's user avatar
0 votes
0 answers
16 views

How i can show the Direct parent folder name/title inside my PnP Modern Search web part's Search Results

I have added this PnP Search Results, to only show folders with name ="Specs" inside a specific document library :- and we got this valid results:- Our folder structure looks as follow:- ...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
11 views

Get list items and check if duplicate exists

I need help to validate if an item with the same name already exists in a SharePoint 2019 list using SPFx on the same site. I have a custom built form that is used for other validations. In that form, ...
Youseff's user avatar
0 votes
1 answer
27 views

Copy site root libraries and sub libraries with all permission using Get-PnPSiteTemplate

Our SharePoint sites have yearly structure like 2024->subfolders. When I use below PowerShell code to copy existing site template to new site then I am getting only root folders created. Each root ...
Max's user avatar
  • 1
0 votes
1 answer
30 views

how i can control the properties/fields that can be retrieved from SharePoint inside my PnP core sdk

I have this pnp core sdk code:- var myList = await context.Web.Lists.GetByTitleAsync("Work Orders", p => p.Title, p => p.Fields....
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
55 views

Connecting a .net 8.0 console application which uses PnP Core sdk to sharepoint online using certificate

I have create a AD app registration which uses self-signed certificate for authentication. and i grant the AD app registration full control on SharePoint and graph APIs. now i want to build a .net 8.0 ...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
18 views

Can i use PnP core sdk inside .net 8.0 console application and use AD App registration which uses self-signed certificate

I have created a AD app registration which uses self-signed certificate for authentication. and i grant the AD app registration full control on SharePoint and graph APIs. Now I want to build a .NET 8....
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
43 views

Unable search and filter items based on Chinese & Japanese languages

I have a SharePoint list that contains fields as translations for the Title field in different languages. Some of them are Chinese Simplified, Chinese Traditional and Japanese. When I try to query the ...
Mohamed Derhalli's user avatar
0 votes
0 answers
51 views

Using "Microsoft Search" is not showing the RefinableString managed properties inside the "PnP search filter" web part

I have created 2 SharePoint site columns of type managed metadata named "CustomDocumentType" & "CustomClient", as a result i got those 2 managed properties :- and those 2 ...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
21 views

Update a folder custom property after a searchresult

In my SharePoint site, I have my document library "MyDocs", and I have a list of companies "Companies" I added a new lookup column to the document Library "Company" to ...
serge's user avatar
  • 133
0 votes
1 answer
78 views

Search a folder in a document library with PnP

how can I search on a document library for the folders containg a specific name? where is the doc for that? I want to seach my document library "MyDocs" for folders containing, in the title, ...
serge's user avatar
  • 133
0 votes
0 answers
101 views

Add-PnPPageWebPart: Object reference not set to an instance of an object

I'm trying to add Quick Links to my SharePoint site using the PnP Module. However, when trying to run the command: Add-PnPPageWebPart -Page $page -DefaultWebPartType "QuickLinks" -Section 2 -...
Semper's user avatar
  • 1
0 votes
0 answers
37 views

Adjusting size PnP Adaptive Card Result

I have an Adaptive card customer Search on PnP Search Result page. across each document I have an image thumbnail and when I click on the thumbnail and small screen opens and you can see they document....
Val's user avatar
  • 1
0 votes
0 answers
54 views

How to update Enterprise Keywords column in SPFx WebPart or Extension using PnPJs

How can I update the Enterprise Keywords column of a SharePoint document library using PnPjs in a SharePoint Framework (SPFx) Web Part or Extension. How can I design a user-friendly user interface (UI)...
Santosh Kalange's user avatar
0 votes
0 answers
54 views

PNP Dynamic Form - cascading look up column and tabs

Can you please help me on below topics regarding to PNP Dynamic form in SPFx how to filter and cascade look up column how to arrange fileds in tabs Thanks Praveen
Praveen Padmakaran's user avatar
1 vote
0 answers
225 views

How can I display a RefinableString in PNP Search Results Template?

How can I display a RefinableString in PNP Search Results Template? I've created the managed metadata field (RefinableString100), I have it mapped to my field in the document library and I've selected ...
Smitman's user avatar
  • 21
0 votes
0 answers
236 views

PNP Modern Search - shuffling results or sorting by relevance?

I'm using the PNP Modern Search results webpart to create a "related results" sidebar to add to each of my pages in the IT knowledge base I'm creating. I have it set to show results that ...
Caroline's user avatar
0 votes
1 answer
142 views

How to get all terms's parent data in PnP?

I'm updating the dependencies of an old project, and one of them is upgrading from PnP 1.x to 3.x. We'll be running it on the latest SharePoint Online. In old project, it write the code to retrieve a ...
LanMegumi's user avatar
1 vote
1 answer
281 views

How to get the unique viewers count of a document?

I see in SharePoint per document the viewers count. I would like to generate a csv report for all my documents in a specific site/library. I try this PowerShell command, but the the properties "...
Ola's user avatar
  • 4,405
0 votes
2 answers
1k views

How to get file metadata by REST API?

I have a video file named simpleVideo2 (360p).mp4 in folder Video Assets(It's document library), and I want to know if it's possible to fetch file metadata through the REST API to get the video's ...
LanMegumi's user avatar
0 votes
1 answer
26 views

Searching for ContentType name works, but not for ID/GUID

I have a webpart solution that searches contentType via name like: ContentType: My_CT I want to change this and use the CTs GUID, like: ContentTypeId: 0x01007B8C5278BB810F499CC61F62C6B14FC5 But it ...
Arte's user avatar
  • 167
0 votes
0 answers
57 views

Provision role definition permission "Override List Behaviors"

Situation: using PnP Provisioning Schema for site structure (lists, CTs, fields, etc). Created new permission level and want to enable specific permission "Overrdide List Behaviors" via code....
Kristaps Vilerts's user avatar
1 vote
1 answer
57 views

How can I search for SiteName and SiteURL associated with my Sharepoint hub site using PnP Modern Search?

I am using PnP modern search for Sharepoint Online hub site, the hub site has around 100 associated sites. I need a query which return the result if SiteName or SiteURL contains that search terms. For ...
Surendra Mourya's user avatar
0 votes
0 answers
96 views

Unable to get/write the folder name using FileLeafRef inside my PnP Power shell script

I have this PnP PowerShell script to get the folder name:- PS C:\Users\m> $SiteURL = "https://***.sharepoint.com/sites/FilePortal" PS C:\Users\m> $mainfolderUrl = "/sites/...
microsoftdeveloperdesigner's user avatar
0 votes
0 answers
14 views

Cannot re-add CT from hub to a list after deleting it via PNP script

I added a CT, published from the CT hub, to a SharePoint site page library. I then used script to first remove the CT from the list. Remove-PnPContentTypeFromList -List "SitePages" -...
Arte's user avatar
  • 167
2 votes
1 answer
2k views

Getting error "The app principal does not exist" when connecting to SharePoint Online from a C# Console App

Having recently moved our intranet from SharePoint on-premises to SharePoint Online, I'm now trying to get a bunch of C# Console Apps (.NET Framework) to work with the new version of the sites. I ...
bob777's user avatar
  • 23
1 vote
1 answer
95 views

Security Validation error while executing Get-PnPAzureACSPrincipal command

I am executing the below PnP Powershell command to get the App Principals registered in the SPO Site: Connect-PnPOnline -Url "SiteURL" -TenantAdminUrl "TenantAdminSiteURL" -...
George's user avatar
  • 1,522
0 votes
0 answers
76 views

How do I get /_layout/15/event.aspx to show a single instance of a recurring event on SharePoint Online

Using pnp/sp we are able to get the list of events including the recurring ones expanded but when we click on the details url we want it to go to the single instance of event with this layout /_layout/...
fgalarraga88's user avatar
1 vote
1 answer
1k views

PnP Modern Search. Filter Current user

I would like to be able to display list results to users that only contain their name. I have 2 possible ways I think this can be done, but not sure how. In the Query template section, I have https://...
Harry's user avatar
  • 13
0 votes
1 answer
223 views

How to apply OneColumnFullWidth section in SharePoint site template

I have created a site template using PnP framework: <pnp:Section Order="3" Type="OneColumnFullWidth"> <pnp:Controls> <pnp:CanvasControl ...
Alias Varghese's user avatar
0 votes
1 answer
56 views

link leading to site page does not render

I created a link (.url) in a Document Library that points to a site page within another site (.aspx). If I click the link from the Document Library it redirects and opens the file fine. If I click ...
zkent's user avatar
  • 149
1 vote
0 answers
348 views

PnP search result WebPart syntax to split Url and get document Breadcrumb

I'm trying to display document breadcrumb on PnP search results by adapting the code from Search Result WebPart: <ul class="breadcrumb"> {{# each (after (split (after Path (length ...
Salah's user avatar
  • 11
0 votes
1 answer
225 views

Query suggestion based on list for PnP

My site is in SharePoint 365. I have a list of "locations". I need to understand the steps to get my PnP Search bar suggest the items from the list. I have created a site column and ...
zkent's user avatar
  • 149
0 votes
1 answer
109 views

Hide a field from New & Edit list forms is not working on the site level, only working on the list level

I have this PnP Power shell to hide 2 fields from the New & Edit forms:- #Config Variables $SiteURL = "https://****sharepoint.com/sites/c1" $ListName = "CustomTest" $FieldName =...
microsoftdeveloperdesigner's user avatar
0 votes
1 answer
171 views

Create a SharePoint Modern Team Site with PNP PowerShell

I tried to create a new Modern SharePoint Site with the PNP Framework. I ran in the following error. I want to store the Url in a variable. Everytime I store it in a variabel I get an error message: ...
Matthias's user avatar
0 votes
1 answer
79 views

SharePoint 2013 : Get-PnPFile: No digest found!

How to download SharePoint 2013 document library files using the PnP command Get-PnPFile ? Connect-PnPOnline -Url http://sharepoint2013site -TransformationOnPrem -CurrentCredential $items = (Get-...
ameliapond's user avatar
0 votes
1 answer
859 views

Customizing the PnP document search handlebar template in SharePoint online

I would like to customize PnP search web part so it show results same as we see in default search in sharepoint with document preview and created data and modified data short summary and dividing line ...
Ashok 's user avatar
  • 59
2 votes
2 answers
2k views

Exclude folders from Document Library displayed using PnP Search Results

We are building a new intranet in SPO. I have a document library with many folders and documents. I am using the PnP Search Result with the following {searchTerms} Path:https://TENENT.sharepoint.com/...
zkent's user avatar
  • 149
0 votes
1 answer
226 views

LivePersona control doesn't work

I did everything according to the pnp documentation (https://pnp.github.io/sp-dev-fx-controls-react/controls/LivePersona/#livepersona-control), but the LivePersona control does not work for me. Photo ...
Propool's user avatar
  • 37
0 votes
1 answer
105 views

Search Text Web Parts Content using PNP Modern Search

Using PNP Modern Search, how can I search for Text Web Parts content on site pages?
JUR's user avatar
  • 1
0 votes
0 answers
35 views

The name of the Site Collection does not appear in the service query

Could you help me please, I try to understand, why the site collection doesn't appear in my service query? This way, I get an error: This is my service to get data from list: export class ...
Propool's user avatar
  • 37
0 votes
1 answer
150 views

What is the SharePoint Crawled Property for Azure Active Directory "Country" property?

I am trying to map the "Country" field property from Azure Active Directory User Profile to a custom Managed Property in SharePoint for search purposes. What is the correct "Crawled ...
thebernardlim's user avatar
0 votes
1 answer
204 views

Unable to display Azure AD Location details on PnP Search Results

I am trying to display the user's location via Azure AD profile in the Pnp Search Results, however it is always returning empty. AD User Details Managed properties in SharePoint Admin SharePoint ...
thebernardlim's user avatar
0 votes
0 answers
182 views

How do Update selected users in PnP PeoplePicker

In my spfx react component I have a DropDown field for selecting department and a PeoplePicker control for selecting the responsible employee. Each time department is changed (the dropbox), the ...
JakeBaron's user avatar
0 votes
3 answers
2k views

Customizing PnP Search results

I have added some columns to a Document Library. I want to use the PnP Modern Search Results V4 to display the results but I am stuck trying to get columns that I added to display. I'll use this &...
zkent's user avatar
  • 149
1 vote
1 answer
269 views

PnP JS Person field only returns FieldId and FieldStringId

I have a list with a few columns that are Person columns. Below is a snippet without a select nor expand: const newHires = this._sp.web.lists.getById(`${listId}`).items<ListItem[]>(); const ...
Jono Suave's user avatar

1
2 3 4 5
9