Forum Discussion
Certificate error
- Sep 11, 2016
I was able to resolve my issue.
These are the steps that were different in my successful attempt:
1) When creating the self signed cert, I passed the date parameters in MM/DD/YYYY format, and added the -String.
Previously I was passing the date as DD/MM/YYYY. The snippet I ran was as follows:
.\Create-SelfSignedCertificate.ps1 -CommonName "cwl-partner-pack" -StartDate 09/11/2016 -EndDate 09/11/2018 -Password(ConvertTo-SecureString -String "foo" -AsPlainText -Force)
2) My VS2015 was signed in under my microsft account registered with MSDN, which is not the subscription I was working with. To make sure I was targeting the right subscription, I signed out of visual studio (top right) and in the cloud explorer I connected to the target subscription.
3) This is the one I think that was the fix. When I ran the publish dialog, I imported the publishing profile, but instead of publishing I click on "Close" (next to publish). Then I ran the publish dialog again, and this time the "Enable Organizational Auhtentication" option appeared, and was checked off. I unchecked it, then published with successful outcome.
Bob
Yes I completed the steps to create the x.509 self signed certificate and uploaded it to my web app, as per the instructions. I also added the "WEBSITE_LOAD_CERTIFICATES" with value of "*" to the App Settings area. I used the latest PNP-Powershell from github to create the cert, extract the Key information, paste into the manifest and upload back into the Azure AD App configuration.
Other details:
- added the "/" at the end of the reply to address in the Azure AD app configuration
- for the Azure AD app, added the app permissions for SPO and delegate permissions for Microsoft Graph (read and write access to USer Profiles) FYI I missed this on the first attempt.
- When generating the secret for the Azure AD app, I specified two years instead of one.
- creation of Infrastrucutral Site, provisioning of Infrastructral site, and web.config customization were completed successfully using the powershell scripts.
I was follwing the video, which obfiscates some of the powershell text when creating the cert. Here is what I used to create the cert, perhaps thats an issue.
.\Create-SelfSignedCertificate.ps1 -CommonName "mysiteprovisioning" -StartDate 06/09/2016 -EndDate 06/09/2018 -Password(ConvertTo-SecureString "xxxxxx" -AsPlainText -Force)
I did make three attempts. Each time I deleted the Azure AD app, the web app. and the infrastructual site collection in my tenant. I was careful to isolate certs, Client IDs, etc. between each attempt. Each time I landed on this error on page load:
Oops! Exception occurred!
© http://aka.ms/OfficeDevPnP - PnP Partner Pack version: 1.1 (February 2016)
Bob
One last thing to doublecheck is how you've published the web app...from the guide: "When you publish the web application, remember to *uncheck *the option "Enable Organizational Authentication". If you leave this selected you migh face authentication issues when running the pnp-partner-pack"
I've specifically addded that to the docs as I was having similar issues like you're seeing when I deployed the partner pack.