Forum Widgets
Latest Discussions
How to upgrade PnP PowerShell to the latest version?
I am using PnP PowerShell to manage a SharePoint Online site, and I noticed that some of the old commands show warnings about being deprecated or incompatible. My questions are: How can I upgrade PnP PowerShell to the latest version? What are the key changes in commands and parameters between the old and new versions?ForraAug 19, 2025Copper Contributor39Views1like0CommentsImporting JSON as a list in SharePoint Online via pnp
I'm trying to import a JSON list file to my Sharepoint online website. But it seems impossible to import it directly. Does anyone know a possibility via pnp because I saw a method on pnp named "fromJson" but I don't know how to use it to import my files to my SharePoint website. Thanks in advance!Zayd_SLS_63Mar 10, 2025Copper Contributor61Views0likes0CommentsExport / Import from Excel file in SharePoint (SPFx)
Here is the tool which will help you to import excel file into a list. This tool will not create any kind of list or column. It will help users to import their excel file in specific list. This tool also allows users to update existing records directly from excel file. I have develop the tool in SharePoint Framework. Currently this tool is for SharePoint Online version only. We are supporting following columns : Single line of text Multiple lines of text Number Yes/No Person or Group (Person + Group) Person or Group (Person + Group) (Allow multiple selections) Date and Time Choice Choice (Allow multiple selections) Hyperlink or Picture Currency Managed Metadata Managed Metadata (Allow multiple values) Lookup Lookup (Allow multiple values) Installation of App :- 1. Click here to download the https://raw.githubusercontent.com/gauravgoyal5/ExportImportExcelInSharePoint.github.io/gh-pages/sps-import-from-excel.sppkg. 2. Visit the Microsoft 365 SharePoint Admin Center 3. Go to Apps -> App Catalog. If you don't have app catalog, https://www.youtube.com/watch?v=xEc8X7VVtc8. If you have Site Collection level App Catalog, just to to Apps for SharePoint from your site collection. 4. Click 'Upload' and select sps-import-from-excel.sppkg file to upload. 5. Check the box for Make this solution available to all sites in the organization and click the Deploy button. 6. A successful installation will look like this: 7. if you receive an App Package Error Message stating, "Deployment failed," as shown here, simply delete the .sppkg file and repeat steps 4 and 5 to redeploy. 8. Now go to the site where you want this tool. Just create a new page or edit existing page and add a webpart 'SPS Import From Excel'. This tool has help on each steps. You can read and start exporting or importing the excel. How To Setup How To Use Enjoy!!!Gaurav GoyalDec 23, 2024Brass Contributor5.6KViews1like4CommentsIssue in connecting Azure Ad user api command from PNP online PS script
I have created a Powershell script in Azure function app. Have connected pnponline using Client id and thumbprint by creating an App registration with Graph API. The code is as below. Connect-PnPOnline -Url $adminSiteUrl -ClientId $clientId -Thumbprint $Thumbprint -Tenant "$($tenantName).onmicrosoft.com" Write-Information "Connected Pnp online Successful" $AzureAd = Get-PnPAzureADUser | Select-object Mail,DisplayName,UserPrincipalName Pnp online script has connected successfully but on executing the last line Get-PnpAzureADUser, i am getting the error as below. Error: The provided value for scope User.Read.All is not valid. Client credential flows must have a scope value with /.default suffixed to the resource identifier (application ID URI). Please help me on this issue.AGanesan2140Sep 19, 2024Copper Contributor211Views0likes1CommentNeed to remove one drive folder using PnP Powershell
Hi Team, I'm trying to remove a folder using PnP and its throwing error as 404 Not Found, commands i am using as below Connect-PnPOnline -Url "onedrive Url" - credential (Get-Credential) $name = "Nest1" $Folderpath = "Document\Nest1" Remove-PnPFolder -Name $name -Folder $Folderpath - Force -Recycle Thank you for your help Regards SauravSAURAV KUMARDec 21, 2023Copper Contributor2KViews0likes2CommentsPnP - Search Filters template with multi-values
How do I update the template for PnP filters to separate the multi-values? This is what the filter options look like now: This is what the filter options should look like: The code I have now for the filter template is: <content id="data-content"> <style> .filter { margin-bottom: 30px; } .filter--value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; } .filter--message { padding: 10px; } .filter--name { font-weight: bold; font-size: 16px; color: rgb(119, 117, 111); padding: 0px 0px 5px; } pnp-filtercheckbox { max-width: 100%; } pnp-filtercombobox { flex: 1; } pnp-filterComboBox > div { display: flex; align-items: stretch; padding: 0; } .filterComboBox { align-items: center; flex: 1; } mailto:%23%7B%7B@root.instanceId%7D%7Dwrapper { max-width: 100% !important; } .ms-ComboBox { max-width: 100% !important; min-width: 100%; width: 100%; } .ms-ComboBox-container { width: 100%; } .ms-ComboBox-header { bottom: 0; height: 45px; position: fixed; top: 127px; } .ms-Fabric { width: 100%; } </style> <div class="template vertical"> {{#each root.filters as |filter|}} <div class="filter"> <div class="filter--name">{{filter.displayName}}</div> <div class="filter--value"> <pnp-filtercombobox data-instance-id=mailto:%7b%7b@root.instanceId%7d%7d data-filter-name="{{filter.filterName}}" data-is-multi="{{filter.isMulti}}" data-show-count="{{filter.showCount}}" data-theme-variant="{{JSONstringify root.theme}}" > {{#each filter.values}} <option value="{{value}}" data-selected="{{selected}}" data-disabled="{{disabled}}" data-count="{{count}}">{{name}}</option> {{/each}} </pnp-filtercombobox> </div> </div> {{/each}} </div> </content> I've tried a few different options with the help of ChatGPT but did not get anywhere.msuser1815Nov 06, 2023Copper Contributor643Views0likes0CommentsPnp Search Results Template Help
Hi, I'd like to make the search results look better. I'm currently using the below custom code. I'd like to have each result be enclosed in a box of some sort so that each search result is clearly not related to another search result. The results kind of run together. Also, the values for some of the fields that I have displaying in the search results are actually lookups from either the same or other lists on the same SharePoint site, so I would like to have those appear as clickable links instead of just text. I'd also like to know if I can have those fields not appear if there are no values to display for them. This is what the search results currently look like. Here is the current custom code that I'm using: <content id="data-content"> <style> /* Insert your CSS overrides here */ .example-themePrimary a { color: { { root.theme.palette.themePrimary } } ; } { { #unless root.properties.layoutProperties.showItemThumbnail } } .template--listItem--result { flex-basis: 100%!important; } { { /unless } } </style> <div class="template"> {{#if root.properties.showSelectedFilters}} <pnp-selectedfilters data-filters="{{JSONstringify filters.selectedFilters 2}}" data-filters-configuration="{{JSONstringify filters.filtersConfiguration 2}}" data-instance-id="{{filters.instanceId}}" data-operator="{{filters.filterOperator}}" data-theme-variant="{{JSONstringify root.theme}}"> </pnp-selectedfilters> {{/if}} {{#if root.properties.showResultsCount}} <div class="template--resultCount"> <label class="ms-fontWeight-semibold">{{getCountMessage root.data.totalItemsCount root.inputQueryText}}</label> </div> {{/if}} {{#if root.data.promotedResults}} <ul class="template--defaultList template--promotedResults"> {{#each root.data.promotedResults as |promotedResult|}} <li> <div> <pnp-icon data-name="MiniLink" aria-hidden="true"></pnp-icon> </div> <div> <a href="{{url}}" style="color:{{@root.theme.semanticColors.link}}">{{title}}</a> <div>{{description}}</div> </div> </li> {{/each}} </ul> {{/if}} <ul class="template--defaultList"> {{#each data.items as |item|}} <pnp-select data-enabled="{{@root.properties.itemSelectionProps.allowItemSelection}}" data-index="{{@index}}" data-is-selected="{{isItemSelected root.selectedKeys @index}}"> <template id="content"> <li class="template--listItem"> {{#> resultTypes item=item}} <div class="template--listItem--result"> {{#if root.properties.layoutProperties.showFileIcon}} {{#contains "['STS_Site','STS_Web']" (slot item root.slots.contentclass)}} <pnp-iconfile class="template--listItem--icon" data-extension="{{slot item root.slots.FileType}}" data-is-container="{{slot item root.slots.IsFolder}}" data-image-url="{{item.SiteLogo}}" data-size="32" data-theme-variant="{{JSONstringify root.theme}}"></pnp-iconfile> {{else}} <pnp-iconfile class="template--listItem--icon" data-extension="{{slot item root.slots.FileType}}" data-is-container="{{slot item root.slots.IsFolder}}" data-size="32" data-theme-variant="{{JSONstringify root.theme}}"></pnp-iconfile> {{/contains}} {{/if}} <div class="template--listItem--contentContainer"> <span class="template--listItem--title example-themePrimary"> <a href="{{slot item root.slots.PreviewUrl}}" target="_blank" style="color:{{@root.theme.semanticColors.link}}" data-interception="off">{{slot item root.slots.Title}}</a> </span>{{slot item root.slots.Definition}} <p></p> <span><b>Business Processes: </b>{{slot item root.slots.[Business Processes]}}</span> <span><b>Products/Services: </b>{{slot item root.slots.[Products/Services]}}</span> <span><b>Software/Apps: </b>{{slot item root.slots.[Software/Apps]}}</span> <span><b>Term Owners: </b>{{slot item root.slots.[Term Owners]}}</span> <span><b>Related Terms/Phrases: </b>{{slot item root.slots.[Related Term/Phrase]}}</span> <p></p> <span> <span class="template--listItem--author"> Term last updated by {{#with (split (slot item root.slots.Author) '|')}} {{[1]}} {{/with}} </span> <b><span class="template--listItem--date"> on {{getDate (slot item root.slots.Date) "LL"}}</span></b> </span> <div>{{getSummary (slot item root.slots.Summary)}}</div> <div class="template--listItem--tags example-themePrimary"> {{#if (slot item root.slots.Tags)}} <pnp-icon data-name="Tag" aria-hidden="true" data-theme-variant="{{JSONstringify root.theme}}"></pnp-icon> <div> {{#each (split (slot item root.slots.Tags) ",") as |tag| }} <span>{{trim tag}}</span> {{/each}} </div> {{/if}} </div> </div> </div> {{#if root.properties.layoutProperties.showItemThumbnail}} <div class="template--listItem--thumbnailContainer"> <div class="thumbnail--image"> <pnp-filepreview data-preview-url="{{slot item root.slots.PreviewUrl}}" data-preview-image-url="{{slot item root.slots.PreviewImageUrl}}" data-theme-variant="{{JSONstringify root.theme}}"> <pnp-img alt='preview-image' width="120" src="{{slot item root.slots.PreviewImageUrl}}" loading="lazy" data-error-image="{{@root.utils.defaultImage}}" /> </pnp-filepreview> <div class="thumbnail--hover"> <div> <pnp-icon data-name="DocumentSearch" aria-hidden="true"></pnp-icon> </div> </div> </div> </div> {{/if}} {{/resultTypes}} </li> </template> </pnp-select> {{/each}} </ul> {{#if root.properties.paging.showPaging}} {{#gt root.data.totalItemsCount root.properties.paging.itemsCountPerPage}} <pnp-pagination data-total-items="{{@root.data.totalItemsCount}}" data-hide-first-last-pages="{{@root.properties.paging.hideFirstLastPages}}" data-hide-disabled="{{@root.properties.paging.hideDisabled}}" data-hide-navigation="{{@root.properties.paging.hideNavigation}}" data-range="{{@root.properties.paging.pagingRange}}" data-items-count-per-page="{{@root.properties.paging.itemsCountPerPage}}" data-current-page-number="{{@root.paging.currentPageNumber}}" data-page-links="{{JSONstringify root.data.paging.links}}" data-theme-variant="{{JSONstringify root.theme}}"> </pnp-pagination> {{/gt}} {{/if}} </div> </content> <content id="placeholder-content"> <style> /* Insert your CSS overrides here */ </style> <div class="placeholder"> {{#if root.properties.showResultsCount}} <div class="template--resultCount"> <span class="placeholder--shimmer placeholder--line" style="width: 20%"></span> </div> {{/if}} <ul class="template--defaultList"> {{#times root.properties.paging.itemsCountPerPage}} <li class="template--listItem" tabindex="0"> <div class="template--listItem--result"> {{#if root.properties.layoutProperties.showFileIcon}} <div class="template--listItem--icon placeholder--shimmer "></div> {{/if}} <div class="template--listItem--contentContainer"> <span class="placeholder--shimmer placeholder--line" style="width: 60%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 100%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 100%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 35%"></span> <span class="placeholder--shimmer placeholder--line" style="width: 20%"></span> </div> </div> {{#if root.properties.layoutProperties.showItemThumbnail}} <div class="template--listItem--thumbnailContainer"> <div class="thumbnail--image"> <div class="placeholder--shimmer" style="width: 120px;height: 70px;"></div> </div> </div> {{/if}} </li> {{/times}} </ul> </div> </content>CLSimpsonSep 08, 2023Copper Contributor4.8KViews0likes2CommentsDoes MS have APIs to allow license procurement/fulfillment to be done programmatically
Being a reseller of MS products, are there APIs that our reseller portal can call to facilitate license procurement/fulfillment/management programmatically i.e., no redirect to MS website to do the ordering, signing EULA, paying. We want of call APIs from our portal to allow our customers do the purchasing in a single pane of glass within our portal. Does MS expose APIs to allow this?NokoyashiAug 29, 2023Copper Contributor747Views0likes1CommentauthenticationManager.GetACSAppOnlyContext: ExecuteQuery() - throws error "Token Request Failed"
Hi. I have a .Net Core v6 MVC project using Nuget Package PnP.Framework 1.13.0. This project works fine in LIVE on the App Service in Azure. However, using Visual Studio 2022 and debug on this project keeps throwing a "The SSL connection could not be established, see inner exception.'" or "Token Request failed". This has only started happening recently. I updated to windows 11 about 6 months ago. It did seem firstly intermittent and now it happends pretty much every time on the ExecuteQuery(). I'm wondering if there is throttling somewhere. AuthenticationManager authenticationManager = new AuthenticationManager(); using (ClientContext clientContext = authenticationManager.GetACSAppOnlyContext(_siteUrl, _clientId, _clientSecret)) { User Requester = clientContext.Web.EnsureUser(emailAddress); clientContext.Load(Requester); clientContext.Load(clientContext.Web); clientContext.ExecuteQuery(); Does anyone know if this still works in Debug Mode? Any help appreciated. Thanks. John.johnboy1970Aug 11, 2023Copper Contributor737Views0likes0Comments
Resources
Tags
- PnP5 Topics
- SPFx4 Topics
- How To2 Topics
- PnP PowerShell2 Topics
- Samples1 Topic
- Import From Excel1 Topic
- Azure CDN1 Topic
- App1 Topic
- React1 Topic
- One Drive for Business1 Topic