Microsoft Defender Device Security Groups API

The DeviceSecurityGroups API from Microsoft Defender — 2 operation(s) for devicesecuritygroups.

Operations 4

GET /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups Device security groups list #
GET /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName} Device security groups get #
PUT /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName} Device security groups create or update #
DELETE /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName} Device security groups delete #

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-devicesecuritygroups-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-devicesecuritygroups-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: DeviceSecurityGroups
paths:
  /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups:
    get:
      operationId: DeviceSecurityGroups_List
      tags:
      - DeviceSecurityGroups
      description: Use this method get the list of device security groups for the specified IoT Hub resource.
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - name: resourceId
        in: path
        description: The fully qualified Azure Resource manager identifier of the resource.
        required: true
        x-ms-skip-url-encoding: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceSecurityGroupList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        List all device security groups for the specified IoT Hub resource:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/examples/DeviceSecurityGroups/ListDeviceSecurityGroups_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/2019-08-01/security-IoTSecurity.json
      summary: Device security groups list
      x-summary-source: derived
  /{resourceId}/providers/Microsoft.Security/deviceSecurityGroups/{deviceSecurityGroupName}:
    get:
      operationId: DeviceSecurityGroups_Get
      tags:
      - DeviceSecurityGroups
      description: Use this method to get the device security group for the specified IoT Hub resource.
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - name: resourceId
        in: path
        description: The fully qualified Azure Resource manager identifier of the resource.
        required: true
        x-ms-skip-url-encoding: true
        schema:
          type: string
      - name: deviceSecurityGroupName
        in: path
        description: The name of the device security group. Note that the name of the device security group is case insensitive.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceSecurityGroup'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Get a device security group for the specified IoT Hub resource:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/examples/DeviceSecurityGroups/GetDeviceSecurityGroups_example.json
      x-source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/security-IoTSecurity.json
      summary: Device security groups get
      x-summary-source: derived
    put:
      operationId: DeviceSecurityGroups_CreateOrUpdate
      tags:
      - DeviceSecurityGroups
      description: Use this method to creates or updates the device security group on a specified IoT Hub resource.
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - name: resourceId
        in: path
        description: The fully qualified Azure Resource manager identifier of the resource.
        required: true
        x-ms-skip-url-encoding: true
        schema:
          type: string
      - name: deviceSecurityGroupName
        in: path
        description: The name of the device security group. Note that the name of the device security group is case insensitive.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource 'DeviceSecurityGroup' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceSecurityGroup'
        '201':
          description: Resource 'DeviceSecurityGroup' create operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceSecurityGroup'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Create or update a device security group for the specified IoT hub resource:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/examples/DeviceSecurityGroups/PutDeviceSecurityGroups_example.json
      x-source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/security-IoTSecurity.json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceSecurityGroup'
        description: Security group object.
        required: true
      summary: Device security groups create or update
      x-summary-source: derived
    delete:
      operationId: DeviceSecurityGroups_Delete
      tags:
      - DeviceSecurityGroups
      description: User this method to deletes the device security group.
      parameters:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter
      - name: resourceId
        in: path
        description: The fully qualified Azure Resource manager identifier of the resource.
        required: true
        x-ms-skip-url-encoding: true
        schema:
          type: string
      - name: deviceSecurityGroupName
        in: path
        description: The name of the device security group. Note that the name of the device security group is case insensitive.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource deleted successfully.
        '204':
          description: Resource does not exist.
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Delete a device security group for the specified IoT Hub resource:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/examples/DeviceSecurityGroups/DeleteDeviceSecurityGroups_example.json
      x-source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2019-08-01/security-IoTSecurity.json
      summary: Device security groups delete
      x-summary-source: derived
components:
  schemas:
    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
    ListCustomAlertRule:
      type: object
      description: A List custom alert rule.
      properties:
        valueType:
          $ref: '#/components/schemas/ValueType'
          description: The value type of the items in the list.
          readOnly: true
      allOf:
      - $ref: '#/components/schemas/CustomAlertRule'
      x-ms-discriminator-value: ListCustomAlertRule
    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
    AllowlistCustomAlertRule:
      type: object
      description: A custom alert rule that checks if a value (depends on the custom alert type) is allowed.
      properties:
        allowlistValues:
          type: array
          description: The values to allow. The format of the values depends on the rule type.
          items:
            type: string
      required:
      - allowlistValues
      allOf:
      - $ref: '#/components/schemas/ListCustomAlertRule'
      x-ms-discriminator-value: AllowlistCustomAlertRule
    DenylistCustomAlertRule:
      type: object
      description: A custom alert rule that checks if a value (depends on the custom alert type) is denied.
      properties:
        denylistValues:
          type: array
          description: The values to deny. The format of the values depends on the rule type.
          items:
            type: string
      required:
      - denylistValues
      allOf:
      - $ref: '#/components/schemas/ListCustomAlertRule'
      x-ms-discriminator-value: DenylistCustomAlertRule
    ThresholdCustomAlertRule:
      type: object
      description: A custom alert rule that checks if a value (depends on the custom alert type) is within the given range.
      properties:
        minThreshold:
          type: integer
          format: int32
          description: The minimum threshold.
        maxThreshold:
          type: integer
          format: int32
          description: The maximum threshold.
      required:
      - minThreshold
      - maxThreshold
      allOf:
      - $ref: '#/components/schemas/CustomAlertRule'
      x-ms-discriminator-value: ThresholdCustomAlertRule
    DeviceSecurityGroupProperties:
      type: object
      description: describes properties of a security group.
      properties:
        thresholdRules:
          type: array
          description: The list of custom alert threshold rules.
          items:
            $ref: '#/components/schemas/ThresholdCustomAlertRule'
        timeWindowRules:
          type: array
          description: The list of custom alert time-window rules.
          items:
            $ref: '#/components/schemas/TimeWindowCustomAlertRule'
        allowlistRules:
          type: array
          description: The allow-list custom alert rules.
          items:
            $ref: '#/components/schemas/AllowlistCustomAlertRule'
        denylistRules:
          type: array
          description: The deny-list custom alert rules.
          items:
            $ref: '#/components/schemas/DenylistCustomAlertRule'
    ValueType:
      type: string
      description: The value type of the items in the list.
      enum:
      - IpCidr
      - String
      x-ms-enum:
        name: ValueType
        modelAsString: true
        values:
        - name: IpCidr
          value: IpCidr
          description: An IP range in CIDR format (e.g. '192.168.0.1/8').
        - name: String
          value: String
          description: Any string value.
    TimeWindowCustomAlertRule:
      type: object
      description: A custom alert rule that checks if the number of activities (depends on the custom alert type) in a time window is within the given range.
      properties:
        timeWindowSize:
          type: string
          format: duration
          description: The time window size in iso8601 format.
      required:
      - timeWindowSize
      allOf:
      - $ref: '#/components/schemas/ThresholdCustomAlertRule'
      x-ms-discriminator-value: TimeWindowCustomAlertRule
    CustomAlertRule:
      type: object
      description: A custom alert rule.
      properties:
        displayName:
          type: string
          description: The display name of the custom alert.
          readOnly: true
        description:
          type: string
          description: The description of the custom alert.
          readOnly: true
        isEnabled:
          type: boolean
          description: Status of the custom alert.
        ruleType:
          type: string
          description: The type of the custom alert rule.
      discriminator:
        propertyName: ruleType
      required:
      - isEnabled
      - ruleType
    DeviceSecurityGroup:
      type: object
      description: The device security group resource
      properties:
        properties:
          $ref: '#/components/schemas/DeviceSecurityGroupProperties'
          description: Device Security group data
          x-ms-client-flatten: true
      allOf:
      - $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/common-types/resource-management/v5/types.json#/definitions/ProxyResource
    DeviceSecurityGroupList:
      type: object
      description: List of device security groups
      properties:
        value:
          type: array
          description: List of device security group objects
          items:
            $ref: '#/components/schemas/DeviceSecurityGroup'
        nextLink:
          type: string
          format: uri
          description: The URI to fetch the next page.
          readOnly: 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.