-
Notifications
You must be signed in to change notification settings - Fork 4k
New-AzureRmKeyVault fails with an error after updating AzureRM to 5.0.0 #4953
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
Comments
@ash1625 Yes, thsi is a known issue and we are starting a hotfix for this issue. You can work around this for now pre-loading the modules: Add-Type -Path <path-to-azure.storage-module>\Microsoft.Data.Service.Clients.dll You may need to load the other microsoft.data clients in that directory similarly. |
@ash1625 The fix for this was just released. If you update your AzureRM or AzureRM.KeyVault modules form the gallery, you should get the fix |
@markcowl i have AzureRM version 5.1.1 and still have the same issue and the work around mentioned also does not seem to work , |
@markcowl I'm experiencing the same issues as @sanathkumarshetty on version 5.1.1 when using Get-AzureRmKeyVault or New-AzureRmKeyVault. |
Thank you, @sanathkumarshetty, you are right! Updating Azure.Storage and AzureRm.Storage fixed the issue |
I am experiencing the same issue and updating those modules did not help. |
Had this issue. Upgraded to Azure RM 5.5 per https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-5.5.0 |
Thanks @daviburg , it worked |
Uh oh!
There was an error while loading. Please reload this page.
Cmdlet(s)
New-AzureRmKeyVault
PowerShell Version
PSVersion
: 5.1.16299.15AzureRm Version : 5.0.0
Module Version
OS Version
10.0.16299.15
Description
I updated my AzureRM module to 5.0.0 and when I try to run New-AzureRMKeyVault I get the below error
New-AzureRmKeyVault : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Debug Output
DEBUG: 2:56:57 PM - NewAzureKeyVault begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 2:56:57 PM - using account id '[email protected]'...
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 8c6e5150-e2de-4697-b92b-245defa6cdbb - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 11/09/2017 22:56:57: 8c6e5150-e2de-4697-b92b-245defa6cdbb - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 8c6e5150-e2de-4697-b92b-245defa6cdbb - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 11/09/2017 22:56:57: 8c6e5150-e2de-4697-b92b-245defa6cdbb - TokenCache: 59.0154462816667 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 8c6e5150-e2de-4697-b92b-245defa6cdbb - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 8c6e5150-e2de-4697-b92b-245defa6cdbb - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: 4O/F+/QRCQSUI6lonClludQukgAvRYwjsLK9vNcQuEo=
Refresh Token Hash: nOlZJvwr9lSwcHADyGRMjZB6oBzi8+2UuNO86a7PM2U=
Expiration Time: 11/09/2017 23:55:58 +00:00
User Hash: zgw64jLEdftXW61TkZVQoJt4KSuSGfpunJmXIjCssqA=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: - TokenCache: Serializing token cache with 2 items.
DEBUG: [Common.Authentication]: Authenticating using Account: '[email protected]', environment: 'AzureCloud', tenant: '72f988bf-86f1-41af-91ab-2d7cd011db47'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: a1498cba-82e5-4eef-8d12-8f73157eee20 - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 11/09/2017 22:56:57: a1498cba-82e5-4eef-8d12-8f73157eee20 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: a1498cba-82e5-4eef-8d12-8f73157eee20 - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 11/09/2017 22:56:57: a1498cba-82e5-4eef-8d12-8f73157eee20 - TokenCache: 59.0154462816667 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: a1498cba-82e5-4eef-8d12-8f73157eee20 - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: a1498cba-82e5-4eef-8d12-8f73157eee20 - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: 4O/F+/QRCQSUI6lonClludQukgAvRYwjsLK9vNcQuEo=
Refresh Token Hash: nOlZJvwr9lSwcHADyGRMjZB6oBzi8+2UuNO86a7PM2U=
Expiration Time: 11/09/2017 23:55:58 +00:00
User Hash: zgw64jLEdftXW61TkZVQoJt4KSuSGfpunJmXIjCssqA=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: - TokenCache: Serializing token cache with 2 items.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 3f23b8d2-8605-474e-9293-f470f0a4ed9e - AcquireTokenHandlerBase: === Token Acquisition started:
Authority: https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (2 items)
Authentication Target: User
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 11/09/2017 22:56:57: 3f23b8d2-8605-474e-9293-f470f0a4ed9e - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 3f23b8d2-8605-474e-9293-f470f0a4ed9e - TokenCache: An item matching the requested resource was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 11/09/2017 22:56:57: 3f23b8d2-8605-474e-9293-f470f0a4ed9e - TokenCache: 59.01541286 minutes left until token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 3f23b8d2-8605-474e-9293-f470f0a4ed9e - TokenCache: A matching item (access token or refresh token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: 3f23b8d2-8605-474e-9293-f470f0a4ed9e - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned:
Access Token Hash: 4O/F+/QRCQSUI6lonClludQukgAvRYwjsLK9vNcQuEo=
Refresh Token Hash: nOlZJvwr9lSwcHADyGRMjZB6oBzi8+2UuNO86a7PM2U=
Expiration Time: 11/09/2017 23:55:58 +00:00
User Hash: zgw64jLEdftXW61TkZVQoJt4KSuSGfpunJmXIjCssqA=
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 11/09/2017 22:56:57: - TokenCache: Serializing token cache with 2 items.
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://management.azure.com/subscriptions/a43a3132-ec4b-47e4-a861-c7b86e988659/resources?$filter=resourceType eq 'Microsoft.KeyVault%2Fvaults'&api-version=2016-09-01
Headers:
x-ms-client-request-id : f85f3dcf-1dce-4db4-bf56-519573709feb
accept-language : en-US
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
OK
Headers:
Pragma : no-cache
x-ms-ratelimit-remaining-subscription-reads: 14956
x-ms-request-id : 06c565cd-3c67-4b79-bf80-0453c49b1b86
x-ms-correlation-request-id : 06c565cd-3c67-4b79-bf80-0453c49b1b86
x-ms-routing-request-id : WESTUS2:20171109T225658Z:06c565cd-3c67-4b79-bf80-0453c49b1b86
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Date : Thu, 09 Nov 2017 22:56:57 GMT
Body:
{
"value": [
{
"id": "/subscriptions/a43a3132-ec4b-47e4-a861-c7b86e988659/resourceGroups/DMSIPINFRA2SouthCentralUSRG/providers/Microsoft.KeyVault/vaults/dmsvaultsi2scus",
"name": "dmsvaultsi2scus",
"type": "Microsoft.KeyVault/vaults",
"location": "southcentralus",
"tags": {}
}
]
}
WARNING: Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
New-AzureRmKeyVault : Could not load file or assembly 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the
file specified.
At line:1 char:1
DEBUG: AzureQoSEvent: CommandName - New-AzureRmKeyVault; IsSuccess - False; Duration - 00:00:01.0145895; Exception - System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.Services.Clien
t, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Data.Services.Client, Version=5.6.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.Azure.ActiveDirectory.GraphClient.ActiveDirectoryClient..ctor(Uri serviceRoot, Func
1 accessTokenGetter, IEnumerable
1 customTypeMappings)at Microsoft.Azure.Commands.KeyVault.KeyVaultManagementCmdletBase.get_ActiveDirectoryClient()
at Microsoft.Azure.Commands.KeyVault.NewAzureKeyVault.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
;
DEBUG: Finish sending metric.
DEBUG: 2:56:59 PM - NewAzureKeyVault end processing.
DEBUG: 2:56:59 PM - NewAzureKeyVault end processing.
Script/Steps for Reproduction
Try to create a key vault using New-AzureRmKeyVault after updating AzureRM to 5.0.0
The text was updated successfully, but these errors were encountered: