Method ‘get_serializationsettings’ in type ‘microsoft.azure.management

In this azure tutorial, we will discuss how to fix the error, Method ‘get_serializationsettings’ in type ‘Microsoft.azure.managementwhich comes while trying to execute the New-AzureRmAutomationConnection command using PowerShell in Azure.

Method ‘get_serializationsettings’ in type ‘microsoft.azure.management

Recently, while trying to execute the New-AzureRmAutomationConnection command using PowerShell, I got the above error message. Below was the cmdlet I was executing for creating the AzureSQL database.

$myConnectionAssetName = "AzureRunAsConnection"
$ConnectionFieldValues = @{"ApplicationId" = $Application.ApplicationId; "TenantId" = $TenantID.TenantId; "CertificateThumbprint" = $Cert.Thumbprint; "SubscriptionId" = $mySubscriptionId}
New-AzureRmAutomationConnection -ResourceGroupName $myResourceGroup -AutomationAccountName $AutomationAccountName -Name $myConnectionAssetName -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $myConnectionFieldValues 
Method 'get_serializationsettings' in type 'microsoft.azure.management
method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’ from assembly ‘microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35’ does not have an implementation.

Error:

The exact error message is

New-AzureRmAutomationConnection : Method ‘get_SerializationSettings’ in type ‘Microsoft.Azure.Management.Internal.Resources.ResourceManagementClient’ from assembly
‘Microsoft.Azure.Commands.ResourceManager.Common, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ does not have an implementation.
At line:10 char:1

  • New-AzureRmAutomationConnection -ResourceGroupName $ResourceGroup -Au …
  • ~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [New-AzureRmAutomationConnection], TypeLoadException
    • FullyQualifiedErrorId : System.TypeLoadException,Microsoft.Azure.Commands.Automation.Cmdlet.NewAzureAutomationConnection

Method ‘get_serializationsettings’ in type ‘microsoft.azure.management [Solution]

Now to fix the above issue, you need to follow the below steps

Step-1:

Run your PowerShell ISE or Windows PowerShell as an administrator mode

method 'get_serializationsettings' in type 'microsoft.azure.management.internal.resources.resourcemanagementclient' from assembly 'microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35' does not have an implementation.
method ‘get_serializationsettings’ in type

Step-2:

Install the AzureRM module referring to my article No match was found for the specified search criteria and module name ‘AzureRM’

Step-3:

Once you have successfully installed the AzureRM module, You can run the below cmdlet again.

$myConnectionAssetName = "AzureRunAsConnection"
$ConnectionFieldValues = @{"ApplicationId" = $Application.ApplicationId; "TenantId" = $TenantID.TenantId; "CertificateThumbprint" = $Cert.Thumbprint; "SubscriptionId" = $mySubscriptionId}
New-AzureRmAutomationConnection -ResourceGroupName $myResourceGroup -AutomationAccountName $AutomationAccountName -Name $myConnectionAssetName -ConnectionTypeName AzureServicePrincipal -ConnectionFieldValues $myConnectionFieldValues 
get_serializationsettings
method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’ from assembly

Now you will not get that error “method ‘get_serializationsettings’ in type” after executing the above cmdlet.

You may like following Azure tutorials:

Wrapping UP

In this Azure tutorial, we discussed how to fix error, Method ‘get_serializationsettings’ in type ‘microsoft.azure.management. The above solution will also fix the below errors

  • method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’ from assembly ‘microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35’ does not have an implementation.
  • get_serializationsettings does not have an implementation
  • method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’
  • login-azurermaccount : method ‘get_serializationsettings’ in type ‘microsoft.azure.management.internal.resources.resourcemanagementclient’ from assembly ‘microsoft.azure.commands.resourcemanager.common, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35’ does not have an implementation.

I hope it helped you to fix your issue !!!.

Leave a Comment