Showing posts from 2019

Authenticating SharePoint with Multi Factor Authentication using PnP PowerShell

SharePoint PnP PowerShell is super helpful when you have a schedule jobs running. You just need to create a package and schedule it in your jobs.

But the issue comes when you have Multi-factor authentication. With Multi-factor authentication, you would need an attended access which is impossible for scheduled PowerShell execution.

We do have details in the PnP PowerShell App Permission article. But since it did not cover the complete approach, I though I would jot it down.

With that in place the solution would be to authenticate using Azure AD App authentication mechanism. We had initiate an issue in GitHub and got response from PnP Legend Erwin Van Huen that Add-In method is recommended. I had to spent some time myself for that to completed. So I thought I would jot the steps which I had followed.

Please keep in mind the pre-requisites for the below approach

PnP PowerShell in your machineSharePoint OnlineAzure AD Management PermissionSince you are going to create an Application in Az…