Notifications
Announcements
No record found.
Hi,
Can anyone tell me how can i generate a secret key vault URL for my Data Export Profile ?
*This post is locked for comments
Hi Biginner,
You have to have a Azure subscription and little PowerShell skills.
https://technet.microsoft.com/en-us/library/mt744592.aspx#SetupAzureKV
# -------------------------------------------------------------------------------- # # Provide the value for the following parameters before executing the script $subscriptionId = 'ContosoSubscriptionId' $keyvaultName = 'ContosoKeyVault' $secretName = 'ContosoDataExportSecret' $resourceGroupName = 'ContosoResourceGroup1' $location = 'West US' $connectionString = 'AzureSQLconnectionString' $organizationIdList = 'ContosoSalesOrg1_id, ContosoSalesOrg2_id' $tenantId = 'tenantId' # -------------------------------------------------------------------------------- # # Login to Azure account, select subscription and tenant Id Login-AzureRmAccount Set-AzureRmContext -TenantId $tenantId -SubscriptionId $subscriptionId # Create new resource group if not exists. $rgAvail = Get-AzureRmResourceGroup -Name $resourceGroupName -Location $location -ErrorAction SilentlyContinue if(!$rgAvail){ New-AzureRmResourceGroup -Name $resourceGroupName -Location $location } # Create new key vault if not exists. $kvAvail = Get-AzureRmKeyVault -VaultName $keyvaultName -ResourceGroupName $resourceGroupName -ErrorAction SilentlyContinue if(!$kvAvail){ New-AzureRmKeyVault -VaultName $keyvaultName -ResourceGroupName $resourceGroupName -Location $location # Wait few seconds for DNS entry to propagate Start-Sleep -Seconds 15 } # Create tags to store allowed set of Organizations. $secretTags = @{} foreach ($orgId in $organizationIdList.Split(',')) { $secretTags.Add($orgId.Trim(), $tenantId) } # Add or update a secret to key vault. $secretVaule = ConvertTo-SecureString $connectionString -AsPlainText -Force $secret = Set-AzureKeyVaultSecret -VaultName $keyvaultName -Name $secretName -SecretValue $secretVaule -Tags $secretTags # Authorize application to access key vault. $servicePrincipal = 'b861dbcc-a7ef-4219-a005-0e4de4ea7dcf' Set-AzureRmKeyVaultAccessPolicy -VaultName $keyvaultName -ServicePrincipalName $servicePrincipal -PermissionsToSecrets get # Display secret url. Write-Host "Connection key vault URL is "$secret.id.TrimEnd($secret.Version)""
Running this above powershell script will generate your secret key.
If found useful, please mark the answer as verified
Regards,
Pranav
Yes, i am running this Powershell script in my Windows Powershell but its not working and throwing errors
will it be possible to share error screen...?
Yes, that I can show you but let me clarify one doubt that why can't I connect Azure sql db as a server in my Azure portal.?
well its a security thing... it is essential to protect data in the cloud. Key Vault provides that feature to encrypt keys and small secrets like passwords that use keys stored in hardware security modules (HSMs).
you can find more details here.: azure.microsoft.com/.../key-vault
Can you tell me if this server is not already added , why still this is showing error ? And if added , where do i find this? It is the same server where i need to export my data using data export service?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2