Alerts - List For Scope
Gets alerts for a resource scope.
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
scope
|
path | True |
string |
The scope of the alert. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK - Returns an array of alerts. |
|
Other Status Codes |
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
GetAlerts
Sample request
GET https://management.azure.com/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts?api-version=2022-08-01-preview
Sample response
{
"value": [
{
"properties": {
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"incidentCount": 1,
"lastModifiedDateTime": "2022-04-05T03:04:06.467+00:00",
"lastScannedDateTime": "2022-04-06T18:25:00.38+00:00",
"isActive": true,
"alertDefinition": {
"properties": {
"displayName": "Too many permanent owners assigned to a resource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"description": "The number of users set to never expire is too high. To enhance the security of your resources, we recommend requiring activation for role use. Take a moment to review the list of users, and suggested changes here.",
"severityLevel": "Medium",
"securityImpact": "Providing users permanent access in a role may leave resources vulnerable to accidental or malicious activity.",
"mitigationSteps": "To mitigate this issue, require the user to activate the role before use.",
"howToPrevent": "Enable “Activation Required” in the role settings menu. This will ensure newly added users must activate their role.",
"isRemediatable": true,
"isConfigurable": true
},
"name": "TooManyPermanentOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyPermanentOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertDefinitions"
},
"alertIncidents": [
{
"properties": {
"alertIncidentType": "TooManyPermanentOwnersAssignedToResourceAlertIncident",
"assigneeName": "testUser",
"assigneeType": "User"
},
"name": "a9f38501-74ec-43ea-8663-6c538602150d",
"type": "Microsoft.Authorization/roleManagementAlerts/alertIncidents",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"
}
],
"alertConfiguration": {
"properties": {
"alertConfigurationType": "TooManyPermanentOwnersAssignedToResourceAlertConfiguration",
"alertDefinitionId": "TooManyPermanentOwnersAssignedToResource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"isEnabled": true,
"thresholdNumberOfPermanentOwners": 10,
"thresholdPercentageOfPermanentOwnersOutOfAllOwners": 10
},
"name": "TooManyPermanentOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyPermanentOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertConfigurations"
}
},
"name": "TooManyPermanentOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyPermanentOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlerts"
},
{
"properties": {
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"incidentCount": 1,
"lastModifiedDateTime": "2022-04-05T03:04:06.467+00:00",
"lastScannedDateTime": "2022-04-06T18:25:00.38+00:00",
"isActive": true,
"alertDefinition": {
"properties": {
"displayName": "Too many owners assigned to a resource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"description": "The number of users with the Owner role is too high. We recommend assigning these individuals to less privileged roles or roles more suitable to their daily needs. Take a moment to review the current assignments, and suggested changes here.",
"severityLevel": "Medium",
"securityImpact": "As the number of users with the owner role increases, so does the potential for malicious or mistaken actions affecting your resource.",
"mitigationSteps": "To mitigate this issue, reduce the number of users in the Owner role. Review the list of users in the list, and reassign them to a less privileged role such as Contributor.",
"howToPrevent": "Choose a role that provides the fewest privileges necessary for a user or group to complete their tasks.",
"isRemediatable": true,
"isConfigurable": true
},
"name": "TooManyOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertDefinitions/TooManyOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertDefinitions"
},
"alertIncidents": [
{
"properties": {
"alertIncidentType": "TooManyOwnersAssignedToResourceAlertIncident",
"assigneeName": "testUser",
"assigneeType": "User"
},
"name": "a9f38501-74ec-43ea-8663-6c538602150d",
"type": "Microsoft.Authorization/roleManagementAlerts/alertIncidents",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource/alertIncidents/a9f38501-74ec-43ea-8663-6c538602150d"
}
],
"alertConfiguration": {
"properties": {
"alertConfigurationType": "TooManyOwnersAssignedToResourceAlertConfiguration",
"alertDefinitionId": "TooManyOwnersAssignedToResource",
"scope": "subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f",
"isEnabled": true,
"thresholdNumberOfOwners": 2,
"thresholdPercentageOfOwnersOutOfAllRoleMembers": 3
},
"name": "TooManyOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlertConfigurations/TooManyOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlertConfigurations"
}
},
"name": "TooManyOwnersAssignedToResource",
"id": "/subscriptions/afa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleManagementAlerts/TooManyOwnersAssignedToResource",
"type": "Microsoft.Authorization/roleManagementAlerts"
}
]
}
Definitions
Name | Description |
---|---|
Alert |
The alert. |
Alert |
Alert configuration. |
Alert |
Alert definition |
Alert |
Alert incident |
Alert |
Alert list operation result. |
Cloud |
An error response from the service. |
Cloud |
An error response from the service. |
Severity |
Severity level of the alert. |
Alert
The alert.
Name | Type | Description |
---|---|---|
id |
string |
The alert ID. |
name |
string |
The alert name. |
properties.alertConfiguration |
The alert configuration. |
|
properties.alertDefinition |
The alert definition. |
|
properties.alertIncidents |
The alert incidents. |
|
properties.incidentCount |
integer |
The number of generated incidents of the alert. |
properties.isActive |
boolean |
False by default; true if the alert is active. |
properties.lastModifiedDateTime |
string |
The date time when the alert configuration was updated or new incidents were generated. |
properties.lastScannedDateTime |
string |
The date time when the alert was last scanned. |
properties.scope |
string |
The alert scope. |
type |
string |
The alert type. |
AlertConfiguration
Alert configuration.
Name | Type | Description |
---|---|---|
id |
string |
The alert configuration ID. |
name |
string |
The alert configuration name. |
properties.alertConfigurationType |
string |
The alert configuration type. |
properties.alertDefinition |
The alert definition. |
|
properties.alertDefinitionId |
string |
The alert definition ID. |
properties.isEnabled |
boolean |
True if the alert is enabled, false will disable the scanning for the specific alert. |
properties.scope |
string |
The alert scope. |
type |
string |
The alert configuration type. |
AlertDefinition
Alert definition
Name | Type | Description |
---|---|---|
id |
string |
The alert definition ID. |
name |
string |
The alert definition name. |
properties.description |
string |
The alert description. |
properties.displayName |
string |
The alert display name. |
properties.howToPrevent |
string |
The ways to prevent the alert. |
properties.isConfigurable |
boolean |
True if the alert configuration can be configured; false, otherwise. |
properties.isRemediatable |
boolean |
True if the alert can be remediated; false, otherwise. |
properties.mitigationSteps |
string |
The methods to mitigate the alert. |
properties.scope |
string |
The alert scope. |
properties.securityImpact |
string |
Security impact of the alert. |
properties.severityLevel |
Severity level of the alert. |
|
type |
string |
The alert definition type. |
AlertIncident
Alert incident
Name | Type | Description |
---|---|---|
id |
string |
The alert incident ID. |
name |
string |
The alert incident name. |
properties.alertIncidentType |
string |
The alert incident type. |
type |
string |
The alert incident type. |
AlertListResult
Alert list operation result.
Name | Type | Description |
---|---|---|
nextLink |
string |
The URL to use for getting the next set of results. |
value |
Alert[] |
Alert list |
CloudError
An error response from the service.
Name | Type | Description |
---|---|---|
error |
An error response from the service. |
CloudErrorBody
An error response from the service.
Name | Type | Description |
---|---|---|
code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
SeverityLevel
Severity level of the alert.
Name | Type | Description |
---|---|---|
High |
string |
|
Low |
string |
|
Medium |
string |