Azure KeyVault Access is denied error

We use arm templates to provision our entire infrastructure. WE use the same service principal which contributor-level access to the entire subscription.
We have arm parameter files that refer to key vault and fetch variables successfully.

We have 1 azure powershell script. where we are trying to store a secret in keyvault.
Here is the command that is used to store a secret

$secretvalue = ConvertTo-SecureString $EventHubSendPolicy -AsPlainText -Force
Set-AzureKeyVaultSecret -VaultName $KeyVault -Name keyname -SecretValue $secretvalue

We are getting this error.
Set-AzureKeyVaultSecret : Access denied
December 21st 2016 23:30:50Error
At C:\Octopus\Work\20161222053043-1546\Script.ps1:5 char:1

Service principal does have access to all secrets. I need help in figuring out why we cannot set the secret.

Thanks

Hi there

Thanks for getting in touch!

Octopus uses the standard Azure libraries, and as this appears to be an Azure Key Vault specific issue, I think the best approach here is for you to contact Azure support directly.

Hope that helps,

Regards
Matt