Microsoft Defender Secure Score API

The Secure Score API from Microsoft Defender — 3 operation(s) for secure score.

Operations 3

GET /subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores Secure scores list #
GET /subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName} Secure scores get #
GET /subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}/secureScoreControls Secure score controls list by secure score #

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-secure-score-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-secure-score-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: Secure Score
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores:
    get:
      operationId: SecureScores_List
      tags:
      - Secure Score
      description: List secure scores for all your Microsoft Defender for Cloud initiatives within your current scope.
      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: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecureScoresList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        List secure scores:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/secureScores/ListSecureScores_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/secureScore.json
      summary: Secure scores list
      x-summary-source: derived
  /subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}:
    get:
      operationId: SecureScores_Get
      tags:
      - Secure Score
      description: Get secure score for a specific Microsoft Defender for Cloud initiative within your current scope. For the ASC Default initiative, use 'ascScore'.
      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: secureScoreName
        in: path
        description: The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample request below.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecureScoreItem'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Get single secure score:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/secureScores/GetSecureScoresSingle_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/secureScore.json
      summary: Secure scores get
      x-summary-source: derived
  /subscriptions/{subscriptionId}/providers/Microsoft.Security/secureScores/{secureScoreName}/secureScoreControls:
    get:
      operationId: SecureScoreControls_ListBySecureScore
      tags:
      - Secure Score
      description: Get all security controls for a specific initiative within a scope
      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: secureScoreName
        in: path
        description: The initiative name. For the ASC Default initiative, use 'ascScore' as in the sample request below.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: OData expand. Optional.
        required: false
        x-ms-enum:
          name: ExpandControlsEnum
          modelAsString: true
          values:
          - name: definition
            value: definition
            description: Add definition object for each control
        schema:
          type: string
          enum:
          - definition
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SecureScoreControlList'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.CloudError'
      x-ms-examples:
        Get security controls and their current score for the specified initiative:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControlsForName_builtin_example.json
        Get security controls and their current score for the specified initiative with the expand parameter:
          $ref: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/security/resource-manager/Microsoft.Security/Security/stable/2020-01-01/examples/secureScores/ListSecureScoreControlsForNameWithExpand_builtin_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/secureScore.json
      summary: Secure score controls list by secure score
      x-summary-source: derived
components:
  schemas:
    SecureScoreControlScoreDetails:
      type: object
      description: Calculation result data in control level
      properties:
        displayName:
          type: string
          description: User friendly display name of the control
          readOnly: true
        score:
          $ref: '#/components/schemas/ScoreDetails'
          description: Actual score object for the control
          x-ms-client-flatten: true
        healthyResourceCount:
          type: integer
          format: int32
          description: Number of healthy resources in the control
          readOnly: true
        unhealthyResourceCount:
          type: integer
          format: int32
          description: Number of unhealthy resources in the control
          readOnly: true
        notApplicableResourceCount:
          type: integer
          format: int32
          description: Number of not applicable resources in the control
          readOnly: true
        weight:
          type: integer
          format: int64
          description: The relative weight for this specific control in each of your subscriptions. Used when calculating an aggregated score for this control across all of your subscriptions.
          minimum: 0
          readOnly: true
        definition:
          $ref: '#/components/schemas/SecureScoreControlDefinitionItem'
          description: Information about the security control.
    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
    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
    SecureScoreControlDefinitionItemProperties:
      type: object
      description: Security Control Definition Properties.
      properties:
        displayName:
          type: string
          description: User friendly display name of the control
          readOnly: true
        description:
          type: string
          description: User friendly description of the control
          maxLength: 256
          readOnly: true
        maxScore:
          type: integer
          format: int32
          description: Maximum control score (0..10)
          minimum: 0
          maximum: 10
          readOnly: true
        source:
          $ref: '#/components/schemas/SecureScoreControlDefinitionSource'
          description: Source object from which the control was created
          readOnly: true
        assessmentDefinitions:
          type: array
          description: Array of assessments metadata IDs that are included in this security control
          items:
            $ref: '#/components/schemas/AzureResourceLink'
          readOnly: true
    ScoreDetails:
      type: object
      description: Calculation result data
      properties:
        max:
          type: integer
          format: int32
          description: Maximum score available
          minimum: 0
          readOnly: true
        current:
          type: number
          format: double
          description: Current score
          minimum: 0
          readOnly: true
        percentage:
          type: number
          format: double
          description: Ratio of the current score divided by the maximum. Rounded to 4 digits after the decimal point
          minimum: 0
          maximum: 1
          readOnly: true
    SecureScoreControlDefinitionItem:
      type: object
      description: Information about the security control.
      properties:
        properties:
          $ref: '#/components/schemas/SecureScoreControlDefinitionItemProperties'
          description: Security Control Definition Properties.
          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/Resource
    SecureScoreItem:
      type: object
      description: Secure score item data model
      properties:
        properties:
          $ref: '#/components/schemas/SecureScoreItemProperties'
          description: Secure score item
          readOnly: true
          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
    SecureScoreControlDefinitionSource:
      type: object
      description: The type of the security control (For example, BuiltIn)
      properties:
        sourceType:
          $ref: '#/components/schemas/ControlType'
          description: The type of security control (for example, BuiltIn)
    SecureScoresList:
      type: object
      description: List of secure scores
      properties:
        value:
          type: array
          description: Collection of secure scores in this page
          items:
            $ref: '#/components/schemas/SecureScoreItem'
          readOnly: true
        nextLink:
          type: string
          description: The URI to fetch the next page.
    AzureResourceLink:
      type: object
      description: Describes an Azure resource with kind
      properties:
        id:
          type: string
          description: Azure resource Id
          readOnly: true
    SecureScoreControlDetails:
      type: object
      description: Details of the security control, its score, and the health status of the relevant resources.
      properties:
        properties:
          $ref: '#/components/schemas/SecureScoreControlScoreDetails'
          description: Calculation result data in control level
          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/Resource
    SecureScoreItemProperties:
      type: object
      description: Describes properties of a calculated secure score.
      properties:
        displayName:
          type: string
          description: The initiative's name
          readOnly: true
        score:
          $ref: '#/components/schemas/ScoreDetails'
          description: score object
          readOnly: true
          x-ms-client-flatten: true
        weight:
          type: integer
          format: int64
          description: The relative weight for each subscription. Used when calculating an aggregated secure score for multiple subscriptions.
          minimum: 0
          readOnly: true
    SecureScoreControlList:
      type: object
      description: List of security controls
      properties:
        value:
          type: array
          description: Collection of security controls in this page
          items:
            $ref: '#/components/schemas/SecureScoreControlDetails'
          readOnly: true
        nextLink:
          type: string
          description: The URI to fetch the next page.
    ControlType:
      type: string
      description: The type of security control (for example, BuiltIn)
      enum:
      - BuiltIn
      - Custom
      x-ms-enum:
        name: ControlType
        modelAsString: true
        values:
        - name: BuiltIn
          value: BuiltIn
          description: Microsoft Defender for Cloud managed assessments
        - name: Custom
          value: Custom
          description: Non Microsoft Defender for Cloud managed assessments
  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.