Custom Recommendations - Get
Get a specific custom recommendation for the requested scope by customRecommendationName
GET https://management.azure.com/{scope}/providers/Microsoft.Security/customRecommendations/{customRecommendationName}?api-version=2024-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
custom
|
path | True |
string pattern: [{]?[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}[}]?$ |
Name of the Custom Recommendation. |
|
scope
|
path | True |
string |
The fully qualified Azure Resource manager identifier of the resource. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
An unexpected error response. |
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 a custom recommendation over management group scope |
| Get a custom recommendation over security connector scope |
| Get a custom recommendation over subscription scope |
Get a custom recommendation over management group scope
Sample request
Sample response
{
"name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"type": "Microsoft.Security/customRecommendations",
"id": "/providers/Microsoft.Management/managementGroups/contoso/providers/Microsoft.Security/customRecommendations/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"properties": {
"description": "organization passwords policy",
"assessmentKey": "d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb",
"cloudProviders": [
"AWS"
],
"displayName": "Password Policy",
"query": "RawEntityMetadata | where Environment == 'GCP' and Identifiers.Type == 'compute.firewalls' | extend IslogConfigEnabled = tobool(Record.logConfig.enable) | extend HealthStatus = iff(IslogConfigEnabled, 'HEALTHY', 'UNHEALTHY')",
"remediationDescription": "Change password policy to...",
"securityIssue": "Vulnerability",
"severity": "Medium"
},
"systemData": {
"createdAt": "2021-08-31T13:47:50.328Z",
"createdBy": "user@contoso.com",
"createdByType": "User",
"lastModifiedAt": "2021-08-31T13:47:50.328Z",
"lastModifiedBy": "user@contoso.com",
"lastModifiedByType": "User"
}
}
Get a custom recommendation over security connector scope
Sample request
Sample response
{
"name": "MycustomRecommendation1",
"type": "Microsoft.Security/customRecommendations",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/resourceGroups/gcpResourceGroup/providers/Microsoft.Security/securityConnectors/gcpconnector/providers/Microsoft.Security/customRecommendations/MycustomRecommendation1",
"properties": {
"description": "organization passwords policy",
"assessmentKey": "d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb",
"cloudProviders": [
"AWS"
],
"displayName": "Password Policy",
"query": "RawEntityMetadata | where Environment == 'GCP' and Identifiers.Type == 'compute.firewalls' | extend IslogConfigEnabled = tobool(Record.logConfig.enable) | extend HealthStatus = iff(IslogConfigEnabled, 'HEALTHY', 'UNHEALTHY')",
"remediationDescription": "Change password policy to...",
"securityIssue": "Vulnerability",
"severity": "Medium"
},
"systemData": {
"createdAt": "2021-08-31T13:47:50.328Z",
"createdBy": "user@contoso.com",
"createdByType": "User",
"lastModifiedAt": "2021-08-31T13:47:50.328Z",
"lastModifiedBy": "user@contoso.com",
"lastModifiedByType": "User"
}
}
Get a custom recommendation over subscription scope
Sample request
Sample response
{
"name": "1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"type": "Microsoft.Security/customRecommendations",
"id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/customRecommendations/1f3afdf9-d0c9-4c3d-847f-89da613e70a8",
"properties": {
"description": "organization passwords policy",
"assessmentKey": "d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb",
"cloudProviders": [
"AWS"
],
"displayName": "Password Policy",
"query": "RawEntityMetadata | where Environment == 'GCP' and Identifiers.Type == 'compute.firewalls' | extend IslogConfigEnabled = tobool(Record.logConfig.enable) | extend HealthStatus = iff(IslogConfigEnabled, 'HEALTHY', 'UNHEALTHY')",
"remediationDescription": "Change password policy to...",
"securityIssue": "Vulnerability",
"severity": "Medium"
},
"systemData": {
"createdAt": "2021-08-31T13:47:50.328Z",
"createdBy": "user@contoso.com",
"createdByType": "User",
"lastModifiedAt": "2021-08-31T13:47:50.328Z",
"lastModifiedBy": "user@contoso.com",
"lastModifiedByType": "User"
}
}
Definitions
| Name | Description |
|---|---|
|
created |
The type of identity that created the resource. |
|
Custom |
Custom Recommendation |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Recommendation |
The cloud that the recommendation is supported on. |
|
Security |
The severity to relate to the assessments generated by this Recommendation. |
|
Severity |
The severity to relate to the assessments generated by this Recommendation. |
|
system |
Metadata pertaining to creation and last modification of the resource. |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CustomRecommendation
Custom Recommendation
| Name | Type | Default value | Description |
|---|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
|
| name |
string |
The name of the resource |
|
| properties.assessmentKey |
string |
The assessment metadata key used when an assessment is generated for this Recommendation. |
|
| properties.cloudProviders |
List of all standard supported clouds. |
||
| properties.description |
string |
The description to relate to the assessments generated by this Recommendation. |
|
| properties.displayName |
string |
The display name of the assessments generated by this Recommendation. |
|
| properties.query |
string |
KQL query representing the Recommendation results required. |
|
| properties.remediationDescription |
string |
The remediation description to relate to the assessments generated by this Recommendation. |
|
| properties.securityIssue | BestPractices |
The severity to relate to the assessments generated by this Recommendation. |
|
| properties.severity | Low |
The severity to relate to the assessments generated by this Recommendation. |
|
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
||
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
RecommendationSupportedClouds
The cloud that the recommendation is supported on.
| Value | Description |
|---|---|
| Azure |
Azure |
| AWS |
AWS |
| GCP |
GCP |
SecurityIssue
The severity to relate to the assessments generated by this Recommendation.
| Value | Description |
|---|---|
| Vulnerability |
Vulnerability |
| ExcessivePermissions |
ExcessivePermissions |
| AnonymousAccess |
AnonymousAccess |
| NetworkExposure |
NetworkExposure |
| TrafficEncryption |
TrafficEncryption |
| BestPractices |
BestPractices |
SeverityEnum
The severity to relate to the assessments generated by this Recommendation.
| Value | Description |
|---|---|
| High |
High |
| Medium |
Medium |
| Low |
Low |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |