Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


John Moe
2022-07-14T22:39:37Z
I'm trying to move my SharePoint connection from using "Default" (username & password) to "Azure AD Application (Certificate)". I've tried many different ways to generate a certificate, and while they all upload to VisualCron fine, when I test the connection, every one of them tells me "Invalid certificate data". I can generate a certificate through VisualCron and it seems to like that, but the only export option is to XML, which I haven't been able to figure out how to upload to my Azure AD Application.

How do I either:

  • Generate a certificate that VisualCron will accept, or
  • Export a VisualCron generated certificate in a way that I can then upload it to Azure AD?
Sponsor
Forum information
Luke Saunders
2022-07-20T21:04:43Z
I also reported this issue and this bug is fixed in 9.9.9 beta build. In my case I was able to use the connection explorer to drill into SharePoint just fine using the Azure App Cert, but the jobs always gave that same error "invalid certificate data".
Luke Saunders
2022-09-01T13:03:57Z
If you've already got your azure certificate created, here's a way to upload with a Powershell task using the certificate for auth:

You'll need to install a couple Powershell modules..
Install-Module Microsoft.Online.SharePoint.Powershell
Install-Module PnP.Powershell

Then create a Powershell task and set up your parameters to pass in. Here's a script that I found to be working:

param (

[string] $TenantId,
[string] $ClientId,
[string] $SharePointURL,
[string] $CertificatePath,
[string] $CertPW,
[string] $SharePointFolder,
[string] $LocalFolder,
[string] $LocalFileMask

)

Connect-PnPOnline -Url $SharePointURL -ClientId $ClientId -Tenant $TenantId -CertificatePath $CertificatePath -CertificatePassword ( $CertPW | ConvertTo-SecureString -AsPlainText -Force )

cd $LocalFolder
foreach ( $spfile in ( Get-ChildItem -File -Path $LocalFolder -Filter $LocalFileMask ) ){

Add-PnPFile -Path "$spfile" -Folder "$SharePointFolder"

}
Michael Fjellström
2022-11-11T14:27:41Z
Originally Posted by: Luke Saunders 

If you've already got your azure certificate created, here's a way to upload with a Powershell task using the certificate for auth:

You'll need to install a couple Powershell modules..
Install-Module Microsoft.Online.SharePoint.Powershell
Install-Module PnP.Powershell

Then create a Powershell task and set up your parameters to pass in. Here's a script that I found to be working:

param (

[string] $TenantId,
[string] $ClientId,
[string] $SharePointURL,
[string] $CertificatePath,
[string] $CertPW,
[string] $SharePointFolder,
[string] $LocalFolder,
[string] $LocalFileMask

)

Connect-PnPOnline -Url $SharePointURL -ClientId $ClientId -Tenant $TenantId -CertificatePath $CertificatePath -CertificatePassword ( $CertPW | ConvertTo-SecureString -AsPlainText -Force )

cd $LocalFolder
foreach ( $spfile in ( Get-ChildItem -File -Path $LocalFolder -Filter $LocalFileMask ) ){

Add-PnPFile -Path "$spfile" -Folder "$SharePointFolder"

}




Luke,

Thank you for the help and contribution.
Scroll to Top