title: Azure SDK call returns 'Bad Request' a.k.a 400 for ResourceManagementClient::Resources::check_existence Method
body: <p>I am using the 'azure_mgmt_resources -v 0.15.1' gem of Azure SDK. I am trying to check the existence of a particular resource on Azure.</p>
  
  <p>This is my code</p>
  
  <pre><code>require 'azure_mgmt_resources'
  include Azure::Resources::Mgmt::V2017_05_10
  include Azure::Resources::Mgmt::V2017_05_10::Models
  
  provider = MsRestAzure::ApplicationTokenProvider.new(
      'Tenant ID',
      'Client ID',
      'Client Secret')
  credentials = MsRest::TokenCredentials.new(provider)
  
  client = ResourceManagementClient.new(credentials)
  client.subscription_id = 'Subscription ID'
  
  response = client.resources.check_existence('Resource Group Name', 'Resource Provider', 'Parent Resource ID', 'Resource Type', 'Resource Name', 'API VERSION')
  </code></pre>
  
  <p>I am running the following two use cases</p>
  
  <p><strong>1. When Resource Does Not Exist</strong></p>
  
  <p>I pass false values to the check_existence method. For this I get back a 404 HTTP response code meaning that the
      resource does not exist, which is the expected response. This use
      case works fine.</p>
  
  <p><strong>2. When Resource Does Exist</strong></p>
  
  <p>I pass the correct values here and I get a 400 HTTP response code meaning that the request I sent is a bad one. I have used the same code as written above for both these cases.</p>
  
  <p>My final analysis is that there is some sort of problem with the Azure server side that it is not returning a correct response when the resource clearly exists. Has anyone else encountered this error? Any feedback would be appreciated.</p>
  
  <p>Thank you!</p>