-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Invalid issuer or signature.' when deploying via Certificate based Apply-PnPProvisioningTemplate and ASP.NET #71
Comments
It seems you're not loading the certificate correctly or the certificate itself is invalid? How are you loading and using the certificate? |
I get a similar issue with PnP.PowerShell v0.3.26-nightly connecting to SPO using Connect-PnPOnline with a client cert. Connect-PnPOnline works fine and I can query site fine. Issue comes when using Get-PnPSiteTemplate - Exception shown blow. It errors when extracting list information
ExceptionMessage : {"error_description":"Invalid issuer or signature."} Any thoughts / recommendation on how to set the certificate would be really appreciated. |
@athomp15 : Can you try to leave lists out of the extract as that will help asses whether the issue is purely related to the web hook extraction |
Hi @jansenbe, Yep that works fine. Sorry I should have mentioned previously. |
@athomp15 : I'm trying from code and can't repro this issue...will see if I can repro from PS. I assume you're using a regular SPO environment (so not something in a "special" cloud) |
@athomp15 : testing from PS shows the issue, we're investigating this now |
Yes that's correct - details below. PSVersion 7.1.0 |
@athomp15 : this issue has been fixed (thanks @erwinvanhunen)...if you use the latest versions tomorrow this will work. Root cause was the REST call to load web hooks: this one does not support app-only requests, so it failed. We've now excluded the web hook extraction when we're running using app-only. Please give this a try and let us know. @pvranich : this issue existed also for applying templates using app-only. You can remove the web hook references from your template or use the new PnP PowerShell nightly version as of tomorrow. |
@jansenbe - thanks for the speedy response. I will give it a whirl tomorrow. Cheers Alex |
So can confirm that for me, running with 'PnP.PowerShell' = '0.3.28-nightly' resolves the issue. List handler working as expected. Thanks for the support @jansenbe |
Hi @jansenbe , Thanks for that but I am don't have any web hook references in my template. Also, I am using .NET not PowerShell. The only way I can get the template to execute correctly is by commenting out the following code.
I am also receiving the same error when this code is included in the template
This is when using version 3.27.2011 of the PnP-Sites-Core package. In response to your original question, I don't think it is the certificate as when I comment out the above lines it works fine and the rest of the template is applied correctly. The code for getting the certificate is
The code for getting the
Thanks in advance |
@pvranich : can you retry with only leaving out the ApplicationLifecycleManagement node...I'm not able to reproduce this issue with the latest PnP Framework version. |
@jansenbe That "works" in the sense the code didn't fail but our custom app is not installed. What version is the latest version? 3.28.2012? Will this require an update to .NET 5.0? Cheers |
Since you've left out the app part the app is not installed, this was just to scope down the issue area. If possible please try with latest versions of PnP Framework / PnP Powershell and see if the problem persists. Did this ever work with certificate based auth before? For PowerShell the latest version is 0.3.32-nightly (see https://www.powershellgallery.com/packages/PnP.PowerShell). We'll be shipping a GA version of the new PnP PowerShell by end of this week. This version uses .NET Standard 2.0 and works with PS5, PS7 and Azure CloudShell. For PnP Framework the latest version is 0.1.108-preview (see https://www.nuget.org/packages/PnP.Framework/). We'll be shipping a GA version by end of the week. This package ships with .NET Standard 2.0 (which still works on .NET Framework, but also on .NET Core) and a .NET 5.0 version...so you can upgrade to .NET 5, but it's not a requirement. |
Hi @pvranich : did using a more recent version get you unblocked? Can we close this issue? |
Hi @jansenbe , I haven't had a chance at this stage. I will do this over the weekend and will have an answer for you on Monday morning. Apologies for the delay Cheers |
Closing this issue. @pvranich : if you still have this issue with the latest build (we fixed some related problems) then please create a new issue describing what goes wrong and the output of Get-PnPException. |
Hi I am moving this issue here as there has been no response in the old repository
I get this error when using app-only certificate oauth 2.0 flow and asp.net 4.8 webservice
'Invalid issuer or signature.' when deploying via Certificate based Apply-PnPProvisioningTemplate
Is there any work being done or any insight to this error?
Thanks in advance
Peter
The text was updated successfully, but these errors were encountered: