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

[BUG]Connect-PnPOnline : Access to the path 'C:\Temp' is denied. #2879

Open
5 tasks
NPrice99 opened this issue Aug 28, 2020 · 2 comments
Open
5 tasks

[BUG]Connect-PnPOnline : Access to the path 'C:\Temp' is denied. #2879

NPrice99 opened this issue Aug 28, 2020 · 2 comments
Assignees
Labels

Comments

@NPrice99
Copy link

If you have a question and are not reporting a bug, please go to:

https://github.com/pnp/pnp-powershell/discussions

Notice

Many bugs reported are actually related to the PnP Core Library which is used behind the scenes. Consider carefully where to report an issue:

Reporting an Issue or Missing Feature

Issue

Expected behavior

Connect-PnPOnline should login me into my Application Registered in Azure AD (see #522)

Actual behavior

Connect-PnPOnline -ClientId xxxx-xxxx-CertificatePath C:\Temp -CertificatePassword (ConvertTo-SecureString -AsPlainText "" -Force) -Url https://.sharepoint.com -Tenant "onmicrosoft.com"

Connect-PnPOnline: Access to Path 'C:\Temp' is denied (I tried a number of paths - all failed with the same message Access to Path is Denied.)

Steps to reproduce behavior

I was following this article :- https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread#setting-up-an-azure-ad-app-for-app-only-access - got as far as Connect-PnPOnline and this failed.

I was following Bert's response to #522

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

  • PnP PowerShell for SharePoint 2013
  • PnP PowerShell for SharePoint 2016
  • PnP PowerShell for SharePoint 2019
  • [X ] PnP PowerShell for SharePoint Online

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

(you can retrieve this by executing Get-Module -Name sharepointpnppowershell* -ListAvailable)
ModuleVersion = 3.24.2008.1

How did you install the PnP-PowerShell Cmdlets?

  • MSI Installed downloaded from GitHub
  • [ X] Installed through the PowerShell Gallery with Install-Module
  • Other means
@kachihro
Copy link

kachihro commented Sep 1, 2020

Can you try running the PowerShell command window "as admin" ?

@jackpoz
Copy link
Contributor

jackpoz commented Sep 3, 2020

According to https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/connect-pnponline?view=sharepoint-ps the -CertificatePath parameter should point to the full path of a *.pfx file.

Please try again specifying the full path like C:\Temp\pnp.pfx instead of the folder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants