Skip to content

Commit

Permalink
Update graph-connector-agent.md
Browse files Browse the repository at this point in the history
Best practice is for authentication certificate to use at least SHA256, default is SHA1.  https://learn.microsoft.com/en-us/entra/identity-platform/howto-create-self-signed-certificate
  • Loading branch information
amaiman authored Oct 15, 2024
1 parent 2ead625 commit 89f48ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MicrosoftSearch/graph-connector-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ $fileName = "agentcert" # What do you want to call the cert files? without the f
$yearsValid = 10 # Number of years until you need to renew the certificate
$certStoreLocation = "cert:\LocalMachine\My"
$expirationDate = (Get-Date).AddYears($yearsValid)
$certificate = New-SelfSignedCertificate -DnsName $dnsName -CertStoreLocation $certStoreLocation -NotAfter $expirationDate -KeyExportPolicy Exportable -KeySpec Signature
$certificate = New-SelfSignedCertificate -DnsName $dnsName -CertStoreLocation $certStoreLocation -NotAfter $expirationDate -KeyExportPolicy Exportable -KeySpec Signature -KeyLength 2048 -KeyAlgorithm RSA -HashAlgorithm SHA256
$certificatePath = $certStoreLocation + '\' + $certificate.Thumbprint
$filePath = $folderPath + '\' + $fileName
$securePassword = ConvertTo-SecureString -String $password -Force -AsPlainText
Expand Down

0 comments on commit 89f48ea

Please sign in to comment.