Questions tagged [office-dev-pnp]

Office 365 Developer Patterns and Practices

Filter by
Sorted by
Tagged with
0 votes
0 answers
54 views

issues Installing pnp/generator

I'm getting this error when I'm trying to install PnP/generator. Do anyone know how I can get passed this issue. I have the SharePoint generator installed already.
MALLIE WILLIAMS's user avatar
0 votes
0 answers
58 views

Getting the error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds

I have a function app to which receives and process webhook notifications from a SharePoint online list. It has been working fine for the past 8 months, today I started getting below exception: "...
Robin Roy's user avatar
0 votes
1 answer
25 views

'SharePointTheme' does not contain a definition for 'customtheme'

I am trying to apply custom theme to my site collection but getting below error while applying: Error CS0117 'SharePointTheme' does not contain a definition for 'customtheme' Below is my code line: ...
kumar's user avatar
  • 139
1 vote
2 answers
2k views

Unwanted permission requested by Azure AD Consent for PnP PowerShell

I am trying to register PnP PowerShell Enterprise app and currently app is requesting 27 different permissions . I would like minimize the number of permissions requested by PnP PowerShell . In my ...
Kiran Kumar Talikoti's user avatar
3 votes
0 answers
458 views

How to authenticate with new PnP core beta

With the classic PnP you could authenticate with something like this: public static ClientContext GetAppContext(string siteUrl, string appId, string appSecret, string appName, OfficeDevPnP.Core....
Thomas Segato's user avatar
0 votes
1 answer
2k views

Failed to execute MS Graph backend request GetGroupInternalApiRequest

In my project, there is a requirement to create Site Collection with Office 365 group, so I have used following method CreateUnifiedGroup of OfficeDevPnP.Core.Framework.Graph namespace. Here is the ...
Pradip R.'s user avatar
  • 2,299
0 votes
1 answer
54 views

Recommended Microsoft 365/SharePoint REST API/Graph API JS library - for custom solution not in SharePoint context

I'm after a reliable REST API JS library i can use to build a custom solution using SharePoint Online backend rest services. This app would be hosted outside the SharePoint context I know of this the ...
naijacoder's user avatar
  • 4,232
1 vote
1 answer
1k views

Powershell CSOM with PnP AuthenticationManager: flush credentials

I've been using an OfficeDevPnp.Core.AuthenticationManager for a long time, in order to support MFA for PowerShell scripts targeting SharePoint Online with CSOM. For my current task, DEV is on tenant-...
sasfrog's user avatar
  • 314
1 vote
2 answers
3k views

Log into SharePoint tenant through CSOM with MFA enabled

I need to log into a SharePoint tenant using an admin account that uses MFA. This is the code. var authManager = new OfficeDevPnP.Core.AuthenticationManager(); var context = authManager....
cescara's user avatar
  • 43
1 vote
0 answers
1k views

SharePoint PnP provisioning engine: applying provisioning template throws "Access denied" error

I am currently facing a strange behaviour with the SharePoint provisioning engine. I am targeting a SharePoint 2019 on-premise version. I am quite sure that this problem is related to authentication, ...
Lancelot's user avatar
  • 175
2 votes
0 answers
140 views

Using PnP provisioning template and updating ExchangeId and IndexId JSON properties for a News web part

I'm using the PnP extension ApplyProvisioningTemplate to apply an XML site template as part of our provisioning process, a C# API running in Azure. One of the ClientSideWebPart we use is News. I have ...
Mattias Lindberg's user avatar
2 votes
1 answer
2k views

User field value not updating using PNP SPFX solution

I'm trying to insert a user field value using people picker in SPFX solution using PNP, but I'm getting the below error. I'm copying the code below which I'm using and the error too which I'm getting ...
Muskan's user avatar
  • 886
1 vote
1 answer
570 views

Using SharePointPnPCoreOnline with Azure Function(v1)

I am creating my first Azure Function(V1) with SharePointPnPCoreOnline package and Visual Studio 2019/2017. When I created a function project without SharePointPnPCoreOnline its working without any ...
Ravi Khambhati's user avatar
0 votes
1 answer
427 views

Using SharePointPnPCoreOnline with Azure Function

I am creating my first Azure Function(with .net core 3.0) with SharePointPnPCoreOnline package. When I created a function project without SharePointPnPCoreOnline its working without any error. But ...
Ravi Khambhati's user avatar
0 votes
1 answer
1k views

Azure Logic App with SharePoint Connection

I am creating my first logic app which connects to SharePoint and adds entries into some sharepoint list. Whenever I create a SharePoint Connection it adds below resource to my logic app. { "type":...
Ravi Khambhati's user avatar
0 votes
1 answer
435 views

pnp schema template issue - how to inlcude "new and existing guests" option in the schema

I am not finding the right XML schema to include it in my PNP provisioning template. How can I include settings called "New and existing guests" for external sharing while provisioning a site using ...
raj's user avatar
  • 1
0 votes
0 answers
402 views

Need to convert a sharepoint list field value from FieldValuesAsText to FieldValuesAsHtml in pnp-sp spfx webpart

I need lookupfield value,peoplepicker field value and enrich multiline text field value in one pnp-sp get call and display it in a table columnd so i used let item: [] = await siteweb.lists....
Bini Jacob's user avatar
0 votes
1 answer
2k views

Get Enriched MultiLineText Field value without loosing its HTML property and Display it without html tag using spfx pnp/sp

I need to get enriched multi line text field value of a list item in SharePoint online SPFX web-part and display the field value in a table column without loosing its html property also hiding html ...
Bini Jacob's user avatar
2 votes
3 answers
8k views

Logic app deployment from DEV to PROD

I am new to Logic Apps so this might be a very basic question. Here is what I have done, I have created a very basic Logic App which will trigger when a new item is created in SharePoint List and ...
Ravi Khambhati's user avatar
4 votes
4 answers
11k views

Property 'web' does not exist on type 'SPRest'

I installed these packages: @pnp/logging @pnp/common @pnp/odata @pnp/sp npm i @pnp/logging @pnp/common @pnp/odata @pnp/sp --save and tried this: import { sp } from '@pnp/sp'; public ...
bAbdenour's user avatar
  • 164
3 votes
1 answer
884 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 ...
Ravi Khambhati's user avatar
0 votes
1 answer
215 views

Setup development environment for SharePoint online

I would like to create a development environment for SharePoint online based on agile on azure DevOps with sandbox for testing purposes and code review. We migrated to the SharePoint online and I am ...
David's user avatar
  • 91
0 votes
1 answer
472 views

pnp.js folder.moveTo() error: Microsoft.SharePoint.Client.ResourceNotFoundException

According to the pnp.js docs at: https://github.com/pnp/pnpjs/blob/dev/packages/sp/src/folders.ts there is a method called moveTo() which presumably moves a folder to a destination. However, the ...
Andrés Biarge's user avatar
0 votes
1 answer
23 views

Not able to see the Label against which Auto Policy has been created

I have followed below steps in order to create label and policy. Create a new Retention labels Publish Policy with "Auto-apply a label" Now when I go back and see the published policy don't see ...
Ravi Khambhati's user avatar
1 vote
1 answer
832 views

Not able to apply SharePoint Retention Policy

I am new to SharePoint Online Data Governance and followed below steps Created a new site Created a new Retention Policy with Specific SharePoint site When I was at step #2 got below error No ...
Ravi Khambhati's user avatar
0 votes
1 answer
478 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-...
Ravi Khambhati's user avatar
0 votes
0 answers
229 views

Programmatically create and Add Owners and Members to O365 Group, no emails are sent

I'm using the code found in OfficeDevPnP.Core to create a new UnifiedGroup. UnifiedGroupsUtitlity.CreateUnifiedGroup. My code is below. UnifiedGroupsUtility.CreateUnifiedGroup("CSOM Site Creation", ...
Cann0nF0dder's user avatar
  • 1,813
0 votes
2 answers
804 views

Add properties to modern site programmatically

I want to add some metadata to my modern Team Site. I can achieve this by simply adding columns to the Site Pages library in the site contents. Now I want to do the same thing programmatically using ...
Szybki's user avatar
  • 178
0 votes
1 answer
3k views

Using PowerShell to connect to Project Online with CSOM under MFA

I am trying to interact with a PWA on a tenant for which I have no choice but to use MFA. I'm trying to use the OfficeDev-PnP library which supports MFA, but can't get it to work with Project Online. ...
sasfrog's user avatar
  • 314
0 votes
1 answer
514 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 ...
Ravi Khambhati's user avatar
1 vote
2 answers
342 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 ...
Ravi Khambhati's user avatar
0 votes
0 answers
141 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="...
Ravi Khambhati's user avatar
0 votes
1 answer
3k views

Could not load type 'Microsoft.SharePoint.Administration.DesignPackageType' from assembly 'Microsoft.SharePoint.Client'

When I try to load "Microsoft.Online.SharePoint.PowerShell" got below error. Not sure where I am going wrong here. Microsoft.Online.SharePoint.PowerShell 16.0.8924.1200 ...
Ravi Khambhati's user avatar
1 vote
4 answers
2k views

Can not install SharePoint Online Management Shell

I am trying to install "SharePoint Online Management Shell" when I do so got below error. This application requires the following to be installed: PowerShell 3.0. When I checked my Power ...
Ravi Khambhati's user avatar
0 votes
1 answer
1k 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. ...
James Amos's user avatar
1 vote
1 answer
982 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 = ...
Thomas Segato's user avatar
0 votes
1 answer
308 views

How to get deleted site collections in SharePoint Online

Is there any way to get all the deleted site collections in SharePoint online using CSOM C# / PNP C# ?. In power shell it is possible, but I am looking in c#. Thanks in advance...
Prakash's user avatar
  • 322
1 vote
3 answers
881 views

What is the best way to store credentials for SharePoint Online?

I will be creating a C# console app that will be executed by a windows task. The purpose of this console app is to prepare a JSON file for bulk user profile update. what is the best way to store SPO ...
Aslan's user avatar
  • 532
0 votes
1 answer
230 views

SharePoint Online Gear menu changed recently

Recently I see the gear icon menu has been changed. Is this something I can revert to old? Can someone help me in getting the official announcements on this by Microsoft?
Ravi Khambhati's user avatar
0 votes
1 answer
290 views

Creating Sharerpoint online communication site with app-only authentication

I am trying to create a communication site using PnP CreateSiteAsync extension. When I authenticate using app-only credential the site is not created and I receive {"SiteId":"","SiteStatus":3,"SiteUrl"...
Chahinez's user avatar
1 vote
1 answer
516 views

How many maximum number of sites will be returned from GetSitePropertiesFromSharePoint

I can find a number of articles on how to get all sites in SharePoint online and everyone referring to the below method https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/...
Ravi Khambhati's user avatar
1 vote
0 answers
19 views

Best way to do site level configuration

I'm not sure if this will be a duplicate or not - I've had a search and can't find it. My issue is, I have the need to add custom configuration/properties to sites when they are provisioned, so these ...
stethelast's user avatar
0 votes
1 answer
30 views

SP.Response.UI doesn't work for Oslo masterpage

I have provisioned a site and have set it up to use the SP.Responsive.UI (PNP). But what i noticed is when its switched to the Oslo masterpage it breaks the site and the OOTB menus and context menu ...
naijacoder's user avatar
  • 4,232
0 votes
1 answer
914 views

Programatically Add a link to QuickLink App

Using Pnp (C#) to provision a modern page and adding a QuickLinks web part. But can't add links to the webpart. Any suggestions?
Anders Nyström's user avatar
2 votes
0 answers
42 views

Working with npm packages in SharePoint hosted app

I am starting to work on a SP 2013 hosted app. I am planning to use typescript and have setup my project with Typescript configurations enabled. I have created a SP module called "dist" and all ...
Unnie's user avatar
  • 8,809
0 votes
1 answer
190 views

Possible to track session of user in sharepoint?

i just got a requirement to modify some code in my SPFX app to detect a user sessions. the requirements is that i have to lock that specific list which is tracked by a separate tracking list (schema: ...
Page F.P.T's user avatar
3 votes
1 answer
6k views

Office UI Fabric Dropdown event onChange not working

I am creating SPFx component with React framework. For UI I am using Office UI Fabric controls. During my development I have found that "Dropdown" control's onChange event is not firing Based on ...
Ravi Khambhati's user avatar
0 votes
1 answer
41 views

Power BI webpart not visible when adding it with OfficeDevPnP

I am creating a console app that will create sitepages with certain webparts in it. To Manage this I am using OfficeDevPnP and how I do it is described in the text below. The issue here is that the ...
Petter Dahl's user avatar
0 votes
0 answers
273 views

SP Online & managed properties : How to render Enhanced Rich Text from Multiline Columns?

Hello fellow sharepointers ! What I want to achieve : I created an Extension that displays a FAQ list. To retrieve FAQ items in this extension, I'm using PnP and the search() function. In this FAQ ...
Gaelle's user avatar
  • 592
1 vote
1 answer
1k views

Create Site Policy in SharePoitn Online with PowerShell/CSOM

I was researching for add/edit/delete Site Policy in SharePoint Online with PowerShell/REST but with no luck. Is it possible with SharePoint Online with PowerShell/CSOM?
Ravi Khambhati's user avatar