Skip to content

New-AzureRmKeyVault fails with an error after updating AzureRM to 5.0.0 #4953

Description

@ash1625

Cmdlet(s)

New-AzureRmKeyVault

PowerShell Version

PSVersion : 5.1.16299.15
AzureRm 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 'ashind@microsoft.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'ashind@microsoft.com', 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: 'ashind@microsoft.com', 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

  • New-AzureRmKeyVault -VaultName testkeyVault -ResourceGroupName Geneva ...
  •   + CategoryInfo          : CloseError: (:) [New-AzureRmKeyVault], FileNotFoundException
      + FullyQualifiedErrorId : Microsoft.Azure.Commands.KeyVault.NewAzureKeyVault
    
    

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, Func1 accessTokenGetter, IEnumerable1 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

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions