pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

Out of date documentation for Connect to the Microsoft Graph using Application Permissions #2741

Closed Jenny-Neal closed 4 years ago

Jenny-Neal commented 4 years ago

Reporting an Issue or Missing Feature

Reporting an Issue

Expected behavior

Documentation to show how to set this up in the Azure Portal

Actual behavior

Unable to follow documentation as it is out of date

Steps to reproduce behavior

https://github.com/pnp/PnP-PowerShell/tree/master/Samples/Graph.ConnectUsingAppPermissions#connect-to-the-microsoft-graph-using-application-permissions

Which version of the PnP-PowerShell Cmdlets are you using?

What is the version of the Cmdlet module you are running?

n/a

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

KoenZomers commented 4 years ago

Hi @Jenny-Neal. There's actually a really easy way since recently to set this up. I had already started to create a wiki page with more information on the loads of connect options that exist for PnP PowerShell to provide clarity. Have a look at this section: https://github.com/pnp/PnP-PowerShell/wiki/Connect-options#connect-using-a-clientid-and-certificate-from-the-windows-certificate-management-store

This is the most secure and recommended way for authenticating through PnP PowerShell. It explains how you can use Initialize-PnPPowerShellAuthentication to easily set all of this up by just executing one cmdlet.

Let me know if you get stuck or need more help.

Jenny-Neal commented 4 years ago

@KoenZomers Thank you! I've got that working on my local machine, how would I set it up for an Azure function please?

KoenZomers commented 4 years ago

@Jenny-Neal although the Azure UI has changed quite a bit by now, this hopefully will get you going: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioning#create-the-azure-function