-
Notifications
You must be signed in to change notification settings - Fork 304
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
BC21 Encryption Keys for SQL Server Authentication Error #171
Comments
The error message suggests that you check which permissions the user running the PoSh script has on the database. Did you doublecheck that? |
Thanks for your reply . |
Do we need App Registrations in Azure Portal ? |
@KennieNP Could you please advise. thanks. |
You can use SSMS to see users and their permissions |
if (!$RestartingInstance) {
Write-Host „Use custom user to access database“
$EncryptionPassword = „abc123ABC$ %&abc123“
$DatabaseUserName = „DBAdmin“
$DatabasePassword = „D$1234567“
$TrustSQLServerCertificate = $true
$ServiceTierFolder = „C:\Keys\“
$DatabaseServer = „sqlxx.database.windows.net“
$DatabaseSecurePassword = ConvertTo-SecureString -String $DatabasePassword -AsPlainText -Force
$DatabaseCredentials = New-Object PSCredential -ArgumentList $DatabaseUserName, $DatabaseSecurePassword
$DatabaseName = „BC210-DB“
$EncryptionKeyPath = Join-Path $ServiceTierFolder ‚BC.key‘
$EncryptionSecurePassword = ConvertTo-SecureString -String $EncryptionPassword -AsPlainText -Force
New-NAVEncryptionKey -KeyPath $EncryptionKeyPath -Password $EncryptionSecurePassword -Force | Out-Null
Write-Host „Import Encryption Key“
Import-NAVEncryptionKey -ServerInstance DAF
-ApplicationDatabaseServer $DatabaseServer
-ApplicationDatabaseCredentials $DatabaseCredentials
-ApplicationDatabaseName $DatabaseName
-KeyPath $EncryptionKeyPath
-Password $EncryptionSecurePassword
-WarningAction SilentlyContinue
-Force
Set-NAVServerConfiguration -ServerInstance „DAF“ -KeyName „EnableSqlConnectionEncryption“ -KeyValue „true“ -WarningAction SilentlyContinue
Set-NAVServerConfiguration -ServerInstance „DAF“ -KeyName „TrustSQLServerCertificate“ -KeyValue $TrustSQLServerCertificate.Tostring().ToLowerInvariant() -WarningAction SilentlyContinue
Set-NavServerConfiguration -serverinstance „DAF“ -databaseCredentials $DatabaseCredentials
}
Any Suggestions for the below error cause.
Error :
The text was updated successfully, but these errors were encountered: