-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
New-AzureRmDataLakeStoreAccount + KeyVault throws: The service principal of the Data Lake Store account [account name] does not have access to the Key Vault [key vault id] #4323
Comments
@begoldsm Hey Ben, would you mind taking a look at this issue? |
That is indeed the case. @cmendible it looks like we missed a scenario where the service principal to use doesn't already exist during initial setup of the Data Lake store account (in that you define it's permissions after account creation). To work around this for now you can either:
Given your script and scenario I would recommend the first option. We will have this change reverted ASAP and it will be in for the next release. |
@cmendible also, the account is successfully created (even with the failure) I believe. So you could do the following:
|
Hi @begoldsm, I was actually working on a video showing the script running and didn't want any red messages on it jejejeje. I ended up reverting back to the previous version of the ADLS cmdlets. I'll keep watching the issue so as soon as you release the fix I'll give it try and come to you guys with feedback. |
Reverting change that resulted in issue #4323
Cmdlet(s)
New-AzureRmDataLakeStoreAccount
PowerShell Version
5.1.14393.1198
Module Version
4.2.0
OS Version
10.0.14393.1198
Description
We have a script which creates a Key Vault a Key Vault Key and then a Data Lake Account encrypted with the Key Vault.
The script looks like this:
So first we create the Vault, then the Data Lake which in turns creates the RN_$dataLakeStoreName service principal and finally add this principal to the Vault Policy and enable the Vault.
This works without issues in version 4.1.0 of the AzureRM module, but once you run it with version 4.2.0 the line calling New-AzureRmDataLakeStoreAccount throws:
The service principal of the Data Lake Store account [data lake name] does not have access to the Key Vault [key vault id]
The new version is trying to validate the service principal which is created with the datalake so it seems to be a "race condition". May be it's related to this new feature:
Added a quality of life update to automatically trigger an
enableKeyVault
call when a user managed KeyVault is added or a key is rotated.Let me know if you need more info.
Thanks!
The text was updated successfully, but these errors were encountered: