7

In the previous versions 'web' was still present in the rest.d.ts file of the @pnp/sp package. That's not the case anymore. In your main webpart TypeScript file, you have to use the import as follow: import { sp } from "@pnp/sp/presets/all";


7

I have done a similar thing recently and have written an article about it. You can easily achieve this by running some SharePoint PowerShell commands. Connect-SPOService -Url https://yoursharepoint-admin.sharepoint.com Set-SPOsite https://yoursharepinttenant.sharepoint.com/sites/yoursharepointsite -DenyAddAndCustomizePages 0 Connect-PnPOnline https://...


6

i managed to do this by adding rows as XML, a alternative option for some scenarios, perhaps? <pnp:Lists> <pnp:ListInstance Title="bookings" Description="bookings list demo" TemplateType="100" Url="Lists/bookings" > <pnp:DataRows UpdateBehavior="Overwrite"> <pnp:DataRow> <pnp:DataValue FieldName="...


5

This is by design. PnP will only migrate the structure and content types and not data. To provision the data, you will need to write a custom extensibility provider. You need to write that in your provisioning template xml somewhat as below: <pnp:Providers> <pnp:Provider Enabled="true" HandlerType="PnP.ExtensibilityProviders.CustomProvider, ...


5

It seems like you can keep the subscription for 99$/year , according to https://docs.microsoft.com/en-us/office/developer-program/office-365-developer-program-faq


4

I do observe the same here. Interestingly, the deprecated onChanged event fires and not onChange. Works if extending a basecomponent and something is missing while extending React.Component. In the end, there's no error.


3

I'm faced the same issue few months ago. According to the Office PnP source code, that behavior is not implemented (Ref: ObjectPageContents.cs). You have to extract yourself pages and their contents then you must update manually your XML schema to add pages to provision them in a new site. Have a look on the schema definition to update your XML Schema. ...


3

There are 2 ways you can avoid such cases, 1. Use Try Catch block Reference msdn try{ Get-SPOSite -Identity $siteUrl } Catch { write-host “error in finding the site”} 2. Change the logic and use filter to handle the null variable something like this $objSite = Get-SPOSite -Filter {Title -eq “XYZ”} This way if the site title is not found, you will end ...


2

I've done some testing using the SharePointPnPCoreOnline NuGet package version 2.26.1805.1 (2018-05-15) against a SharePoint 2013 on premise farm (Version 15.0.4971.1000; October 2017 CU). I can confirm that the following operations are working: Note: MSC = Microsoft.SharePoint.Client namepace Web(s) Adding new properties to MSC.Web.AllProperties Working ...


2

Because the webpart needs a set a configuration, which you provide during editing the page, rather you should add the webpart to the page with preconfigured set of properties. That will make your webpart appear directly


2

Using the content type hub will ensure that the site columns and content types will be available on every site collection and makes updates across the tenant pretty easy. The downside is that we'll have to wait for the timer job to kick in. If you deploy the content types by hand or using some kind of framework then the content type will be available right ...


2

Windows Credential Manager is one option. Another option would be to use a file or registry and use DPAPI. There are lots of examples out there, so don't take the above as the absolute only way to work with these technologies.


2

PnP Management shell is a multi-tenant application and so you can't control its permissions. However, you can ask the Admins to create the Azure AD application with permissions that you need. Once that application is created, you can use that application's client ID and connect as below: Connect-PnPOnline "<url>" -Interactive -ClientId "&...


1

I can reproduce this error, it was failed during the stage of Team provision. In fact the group has been created, you can check it through the admin centre. This error also occurs on PowerShell cmdlets New-PnPUnifiedGroup, I believe it's the same cause and come from below limit: https://docs.microsoft.com/en-us/graph/teams-create-group-and-team (step 4, you ...


1

If the field name is "Users" you can specify it as "UsersId" in your request body like so if you want to set it by user ID: sp.web.lists.getByTitle("test").items.add({ Title: 'test1', testcol:'test2', UsersId: 11 })


1

SharePointPnPCoreOnline is a wrapper around CSOM, which is not compatible with .NET Core without a bit of hacking. You need to use full .NET Framework, and V1 of the Functions runtime, in order to use that Nuget package with Azure Functions.


1

In IReactSpfxProps.ts file: import { WebPartContext } from "@microsoft/sp-webpart-base"; export interface IReactSpfxProps { description: string; context: WebPartContext; } WebPart.ts: import * as React from 'react'; import * as ReactDom from 'react-dom'; import { Version } from '@microsoft/sp-core-library'; import { ...


1

As per below the new command is "o365 login" and not "o365 spo login" https://github.com/pnp/office365-cli/issues/889


1

For tasks like these, I highly recommend using PowerShell PnP. It's a fantastic, powerful and easy-to use PowerShell Module. This is what you want to do in only 4 lines including Installation of the module: Install-Module SharePointPnPPowerShellOnline Connect-PnPOnline -Url https://tenant.sharepoint.com $list = Get-PnPList -Identity "Site Pages" Add-...


1

This is a known issue because server side breaking changes at Microsoft's end. Reference - Breaking change on creating content types using CSOM - Value cannot be null Temporary fix - Update to the latest version of PnP CSOM/PnP PowerShell (3.9.1905.2) from Nuget and then apply the template again, it will fix the issue.


1

You can use GetDeletedSitePropertiesFromSharePoint from the tenant object. Try with the below sample code: string userName = "user@tenant.onmicrosoft.com"; string password = "password"; string siteUrl = "https://tenant-admin.sharepoint.com"; using (ClientContext clientContext = new ClientContext(siteUrl)) { SecureString securePassword = new ...


1

This change is only in modern pages it seems, and while I can't site a reference, I can pretty well tell you that there is no supported way for you to do anything about it, any more than you can do anything else to change modern pages (other than revert to classic pages, if that's an option). That's not counting things like you can do a header, footer, ...


1

CTs are provisioned from the CTHub to the Site Collection which runs on a timer job. Yes, after a new SC is provisioned, you will have to wait for the timer job to complete a run.


1

CSOM for SharePoint online contains the Microsoft.SharePoint.Client.InformationPolicy namespace which contains the API for handling the site policies. You can use it by adding the reference to the Microsoft.Office.Client.Policy.dll and adding using Microsoft.SharePoint.Client.InformationPolicy; to your class. ProjectPolicy.GetProjectPolicies method can ...


1

If I understand you correctly you want to prevent a concurrency issue where two people would save the same item and would overwrite date. With the SharePoint Rest api this is managed with the etag property. If you do a get request, you'll receive an etag value. When you do a patch request you need to provide this value, and if it's not the same as the ...


1

Your subscriptions will be cancelled. If you do not extend them, your data will be made inaccessible as if it was a regular tenant: Answered by Kasper. You have several price-reduced plans to extend subscriptions by your needs. Please be careful when selecting the name of a DEV-Tenant. You might block names that are needed later in production. You cannot ...


1

This error is occurring because you have not enabled Site classifications. You need to enable Site Classifications in your tenant to use the classification parameter. For that, you need to use the PnPSiteClassification command as below: Connect-PnPOnline -Scopes "Directory.ReadWrite.All" Enable-PnPSiteClassification -Classifications "High Impact","Low ...


1

It seems that the engine did not have support for disabling comments on moderns pages at the time of this question. This is now supported according to the update notes for May 2018 update Added CommentsOnSitePagesDisabled property on web settings element in the provisioning engine.


1

In my experience, the PNP provisioning cmdlets are sometimes buggy, and is not yet full featured, although new features are appearing all the time. For now, you can change the "Comments" on a modern page after the page has been created. To disable the comments on a modern page called "Test.aspx": Set-PnPClientSidePage -Identity "Test.aspx" -...


1

maybe you have solved it in the meantime yourself but i ran into the same issue with PnP and an ASP.NET Core 2.0 Webservice. You have to use an Application which uses the .NET Framework and not .NET Core. As far as i know is the PnP Framework built on the standard SharePoint CSOM and there are only Assemblies for the .NET Framework. Regards, Johannes


Only top voted, non community-wiki answers of a minimum length are eligible