The resource type could not be found in the namespace 'Microsoft.Network' Error

by Randi Ratnayake   Last Updated October 10, 2019 00:00 AM

Currently, my team trying to automate ExpressRoute provisioning and configuration using Azure Management API and we are experiencing the error

The resource type could not be found in the namespace 'Microsoft.Network' for api version '2019-07-01'.

We tried a few different API versions as mentioned in the docs and issue seems to be across all versions. We also find this is only an issue with part of the resource types of this provider.

Operations working

  • express route circuits
  • express route circuit connections

Operations returning the same error

  • express route gateways
  • express route cross connections
  • express route connections
  • express route cross connection peerings
  • express route links

The error message:

{
  "error": {
    "code": "InvalidResourceType",
    "message": "The resource type could not be found in the namespace 'Microsoft.Network' for api version '2019-07-01'."
  }
}

We also ran the following PowerShell command to verify currently registered resource types for Microsoft.Network provider and there too we don't see the methods that aren't working getting listed which aligns with the error message we get.

(Get-AzureRmResourceProvider
 -ProviderNamespace Microsoft.Network).ResourceTypes

enter image description here

Either one of two things can be the issue. Either the Azure documentation (https://docs.microsoft.com/en-us/rest/api/expressroute/expressroutecrossconnections/get) is not aligned or either it should be an issue with Azure Management API. We believe later would be more probable.

Has anyone got a clue or any helpful insights how we might go around this issue?



Related Questions


Updated October 18, 2019 06:00 AM

Updated March 21, 2017 17:00 PM

Updated June 22, 2019 01:00 AM

Updated July 02, 2018 19:00 PM