Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

PNP

VIDEO – Load PNP the Right Way

Quick blog post about detecting if PowerShell PNP is available on the local PC and installing is missing (for new systems) to make PS1 script more portable across servers.  (1) Detect command (2) Install module if missing (3) Import module.  Cheers. 

shades_smile

Video

Code

References

VIDEO – Toggle Required Fields OFF

When making bulk data changes to SharePoint List or Library you may need to temporarily turn off Required fields.   Opening this can allow us to import records, apply changes, and modify metadata without prompting that required fields are missing.   PowerShell below can help disable all Required fields OFF.    Script generates a CSV snapshot of prior configuration during run.    CSV can be used to restore original configuration for which fields are Required.

Cheers

shades_smile

VIDEO

PowerShell Code

GitHub Link

References

VIDEO – Attempt to build Angular CLI with PNP JS

Recently attempted to create a command line interface (CLI) project with Angular 6 and SP-PNP-JS library for data access.  Followed tutorial by @arustacean at https://medium.com/ng-sp/angular-spa-in-sharepoint-3e7195741460 but with using the latest version of each library.

GitHub source code available at https://github.com/spjeff/sp-ng

However, received strange errors on the web pack TypeScript build process.   Attached video shows the troubleshooting process.  Cheers! 

shades_smile

Video

Screenshot

ERROR – Initializers are not allowed in ambient contexts.

image

Reference

VIDEO – Disable Legacy Auth & Connect PNP

Even with Legacy auth disabled, you can successfully run Connect-PNPOnline.

Video demo shows changing SPO tenant security, then how to register new AppId for Connect-PNPOnline access to all site collections in tenant.   The “AppRegNew” and “AppInv” ASPX pages can be used to establish authentication channel for PowerShell work in PNP on Office 365 tenants where Legacy Auth is disabled.

Cheers! 

shades_smile

Video

Code

References

-LegacyAuthProtocolsEnabled

By default this value is set to $True.

Setting this parameter prevents Office clients using non-modern authentication protocols from accessing SharePoint Online resources.

A value of True- Enables Office clients using non-modern authentication protocols (such as, Forms-Based Authentication (FBA) or Identity Client Runtime Library (IDCRL)) to access SharePoint resources.

A value of False-Prevents Office clients using non-modern authentication protocols from accessing SharePoint Online resources.

Note

This may also prevent third-party apps from accessing SharePoint Online resources. Also, this will also block apps using the SharePointOnlineCredentials class to access SharePoint Online resources. For additional information about SharePointOnlineCredentials, see SharePointOnlineCredentials class.

Tenant Full Control

Site Collection Full Control

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲