Microsoft Defender Allowed Connections API

The AllowedConnections API from Microsoft Defender — 3 operation(s) for allowedconnections.

Operations 3

GET /subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections Allowed connections list #
GET /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections Allowed connections list by home region #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType} Allowed connections get #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-defender:microsoft-defender-allowedconnections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-defender-allowedconnections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Defender for Cloud REST API (Microsoft.Security)…
  version: stable-composite
  description: Composite of the latest stable Microsoft.Security resource-manager swagger files published by Microsoft in Azure/azure-rest-api-specs. Each path keeps its own api-version via x-source.
  x-source-repo: https://github.com/Azure/azure-rest-api-specs/tree/main/specification/security/resource-manager/Microsoft.Security/Security
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: AllowedConnections
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections:
    get:
      operationId: AllowedConnections_List
      tags:
      - AllowedConnections
      description: Gets the list of all possible traffic between resources for the subscription
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowedConnectionsList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Get allowed connections on a subscription:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnectionsSubscription_example.json
      x-ms-pageable:
        nextLinkName: nextLink
      x-source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/security-SecuritySolutions.json
      summary: Allowed connections list
      x-summary-source: derived
  /subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections:
    get:
      operationId: AllowedConnections_ListByHomeRegion
      tags:
      - AllowedConnections
      description: Gets the list of all possible traffic between resources for the subscription and location.
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - name: ascLocation
        in: path
        description: The location where ASC stores the data of the subscription. can be retrieved from Get locations
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowedConnectionsList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Get allowed connections on a subscription from security data location:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnectionsSubscriptionLocation_example.json
      x-ms-pageable:
        nextLinkName: nextLink
      x-source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/security-SecuritySolutions.json
      summary: Allowed connections list by home region
      x-summary-source: derived
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}
  : get:
      operationId: AllowedConnections_Get
      tags:
      - AllowedConnections
      description: Gets the list of all possible traffic between resources for the subscription and location, based on connection type.
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter
      - name: ascLocation
        in: path
        description: The location where ASC stores the data of the subscription. can be retrieved from Get locations
        required: true
        schema:
          type: string
      - name: connectionType
        in: path
        description: The type of allowed connections (Internal, External)
        required: true
        x-ms-enum:
          name: ConnectionType
          modelAsString: true
          values:
          - name: Internal
            value: Internal
            description: Internal
          - name: External
            value: External
            description: External
        schema:
          type: string
          enum:
          - Internal
          - External
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowedConnectionsResource'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Get allowed connections:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/AllowedConnections/GetAllowedConnections_example.json
      x-source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/security-SecuritySolutions.json
      summary: Allowed connections get
      x-summary-source: derived
components:
  schemas:
    Common.CloudErrorBody:
      type: object
      description: The error detail.
      properties:
        code:
          type: string
          description: The error code.
          readOnly: true
        message:
          type: string
          description: The error message.
          readOnly: true
        target:
          type: string
          description: The error target.
          readOnly: true
        details:
          type: array
          description: The error details.
          items:
            $ref: '#/components/schemas/Common.CloudErrorBody'
          readOnly: true
          x-ms-identifiers: []
        additionalInfo:
          type: array
          description: The error additional info.
          items:
            $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/definitions/ErrorAdditionalInfo
          readOnly: true
          x-ms-identifiers: []
      x-ms-external: true
    ConnectableResource:
      type: object
      description: Describes the allowed inbound and outbound traffic of an Azure resource
      properties:
        id:
          type: string
          description: The Azure resource id
          readOnly: true
        inboundConnectedResources:
          type: array
          description: The list of Azure resources that the resource has inbound allowed connection from
          items:
            $ref: '#/components/schemas/ConnectedResource'
          readOnly: true
        outboundConnectedResources:
          type: array
          description: The list of Azure resources that the resource has outbound allowed connection to
          items:
            $ref: '#/components/schemas/ConnectedResource'
          readOnly: true
    AllowedConnectionsList:
      type: object
      description: List of all possible traffic between Azure resources
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/AllowedConnectionsResource'
          readOnly: true
        nextLink:
          type: string
          description: The URI to fetch the next page.
          readOnly: true
    AllowedConnectionsResource:
      type: object
      description: The resource whose properties describes the allowed traffic between Azure resources
      properties:
        properties:
          $ref: '#/components/schemas/AllowedConnectionsResourceProperties'
          description: Describes the allowed traffic between Azure resources
          readOnly: true
          x-ms-client-flatten: true
        location:
          type: string
          description: Location where the resource is stored
          readOnly: true
      required:
      - location
      allOf:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/definitions/ProxyResource
    ConnectedResource:
      type: object
      description: Describes properties of a connected resource
      properties:
        connectedResourceId:
          type: string
          description: The Azure resource id of the connected resource
          readOnly: true
        tcpPorts:
          type: string
          description: The allowed tcp ports
          readOnly: true
        udpPorts:
          type: string
          description: The allowed udp ports
          readOnly: true
    AllowedConnectionsResourceProperties:
      type: object
      description: Describes the allowed traffic between Azure resources
      properties:
        calculatedDateTime:
          type: string
          format: date-time
          description: The UTC time on which the allowed connections resource was calculated
          readOnly: true
        connectableResources:
          type: array
          description: List of connectable resources
          items:
            $ref: '#/components/schemas/ConnectableResource'
          readOnly: true
    Common.CloudError:
      type: object
      description: Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).
      properties:
        error:
          $ref: '#/components/schemas/Common.CloudErrorBody'
          description: The error object.
          x-ms-client-flatten: true
      x-ms-external: true
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.