Tasks - List

Recommended tasks that will help improve the security of the subscription proactively

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks?api-version=2015-06-01-preview
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/tasks?api-version=2015-06-01-preview&$filter={$filter}

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Azure subscription ID

Regex pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$

api-version
query True

string

API version for the operation

$filter
query

string

OData filter. Optional.

Responses

Name Type Description
200 OK

SecurityTaskList

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get security recommendations tasks

Sample Request

GET https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/tasks?api-version=2015-06-01-preview

Sample Response

{
  "value": [
    {
      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/locations/westeurope/tasks/62609ee7-d0a5-8616-9fe4-1df5cca7758d",
      "name": "62609ee7-d0a5-8616-9fe4-1df5cca7758d",
      "type": "Microsoft.Security/locations/tasks",
      "properties": {
        "state": "Active",
        "subState": "NA",
        "creationTimeUtc": "2018-03-05T10:42:03.9935508Z",
        "lastStateChangeTimeUtc": "2018-03-05T10:42:03.9935508Z",
        "securityTaskParameters": {
          "resourceName": "default",
          "resourceType": "Subnet",
          "resourceParent": "vnet1",
          "location": "uksouth",
          "resourceGroup": "myRg",
          "name": "NetworkSecurityGroupMissingOnSubnet",
          "uniqueKey": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default",
          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/default"
        }
      }
    },
    {
      "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Security/locations/westeurope/tasks/d55b4dc0-779c-c66c-33e5-d7bce24c4222",
      "name": "d55b4dc0-779c-c66c-33e5-d7bce24c4222",
      "type": "Microsoft.Security/locations/tasks",
      "properties": {
        "state": "Active",
        "subState": "NA",
        "creationTimeUtc": "2018-04-02T11:41:27.0541014Z",
        "lastStateChangeTimeUtc": "2018-04-02T11:41:27.0541014Z",
        "securityTaskParameters": {
          "vmId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
          "vmName": "vm1",
          "severity": "High",
          "isOsDiskEncrypted": false,
          "isDataDiskEncrypted": false,
          "name": "EncryptionOnVm",
          "uniqueKey": "EncryptionOnVmTaskParameters_/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1",
          "resourceId": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/myRg/providers/Microsoft.Compute/virtualMachines/vm1"
        }
      }
    }
  ]
}

Definitions

Name Description
CloudError

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

CloudErrorBody

The error detail.

ErrorAdditionalInfo

The resource management error additional info.

SecurityTask

Security task that we recommend to do in order to strengthen security

SecurityTaskList

List of security task recommendations

SecurityTaskParameters

Changing set of properties, depending on the task type that is derived from the name field

CloudError

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Name Type Description
error.additionalInfo

ErrorAdditionalInfo[]

The error additional info.

error.code

string

The error code.

error.details

CloudErrorBody[]

The error details.

error.message

string

The error message.

error.target

string

The error target.

CloudErrorBody

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

CloudErrorBody[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

SecurityTask

Security task that we recommend to do in order to strengthen security

Name Type Description
id

string

Resource Id

name

string

Resource name

properties.creationTimeUtc

string

The time this task was discovered in UTC

properties.lastStateChangeTimeUtc

string

The time this task's details were last changed in UTC

properties.securityTaskParameters

SecurityTaskParameters

Changing set of properties, depending on the task type that is derived from the name field

properties.state

string

State of the task (Active, Resolved etc.)

properties.subState

string

Additional data on the state of the task

type

string

Resource type

SecurityTaskList

List of security task recommendations

Name Type Description
nextLink

string

The URI to fetch the next page.

value

SecurityTask[]

Security task that we recommend to do in order to strengthen security

SecurityTaskParameters

Changing set of properties, depending on the task type that is derived from the name field

Name Type Description
name

string

Name of the task type