Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Connect options

Koen Zomers edited this page May 15, 2020 · 5 revisions

This page is still work in progress and not yet completed

PnP PowerShell offers many ways to connect to an environment. This page provides guidance on the various options you have and how they can be used against which environment(s).

Summary

Option SPO SP On-Prem MS Graph API Management API
Connect interactively using WebLogin supporting MFA X
Connect interactively using scopes X* X*
Connect using a ClientId and certificate from the Windows Certificate Management store X X X
Connecting using a ClientId and PFX certificate stored on your local machine X X X
Connecting using a ClientId and PEM certificate provided as a string X X X
Connecting using a ClientId and a certificate instance X X X
Connecting using a ClientId and a base64 encoded certificate X X X
Connect using ClientId, ClientSecret and SharePoint URL X X X
Connect using ClientId, ClientSecret and AADDomain X X
Connect by providing credentials without MFA X X
Connect by using the current credentials X
Connect using the SPO Management Shell X
Connect using the PnP O365 Management Shell (Device Login) X
Connect using credentials from the Windows Credential Store X
Connect by providing an access token X** X**
Connect using a High Trust with a PFX certificate X
Connect through ADFS using credentials ? ?
Connect through ADFS using a certificate ? ?
Connect using Forms Authentication ?

* = depends on the scopes you provide ** = depends on for which API you have provided the token ? = could\should work, but has not been tested yet

Connect interactively using WebLogin supporting MFA

One of the easiest methods to use. Will log you in interactively by showing a browser screen. Supports multi factor authentication.

Supported environments

Platform Supported
SharePoint Online Yes
SharePoint 2013 No
SharePoint 2016 No
SharePoint 2019 No
Microsoft Graph API No
Office 365 Management API No

Usage sample

Connect-PnPOnline -Url https://tenant.sharepoint.com -UseWebLogin