Deny Assignments - Get
Get the specified deny assignment.
GET https://management.azure.com/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}?api-version=2022-04-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
deny
|
path | True |
string |
The ID of the deny assignment to get. |
scope
|
path | True |
string |
The scope of the deny assignment. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK - Returns information about the deny assignment. |
|
Other Status Codes |
Error response describing why the operation failed. |
Permissions
To call this API, you must be assigned a role that has the following permissions. For more information, see Azure built-in roles.
Microsoft.Authorization/denyAssignments/read
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 deny assignment by name
Sample request
Sample response
{
"properties": {
"denyAssignmentName": "Deny assignment name",
"description": "Deny assignment description",
"permissions": [
{
"actions": [
"action"
],
"notActions": [],
"dataActions": [],
"notDataActions": []
}
],
"scope": "/subscriptions/subId/resourcegroups/rgname",
"doNotApplyToChildScopes": false,
"principals": [
{
"id": "principalId1",
"type": "principalType1"
}
],
"excludePrincipals": [
{
"id": "principalId2",
"type": "principalType2"
}
],
"isSystemProtected": true
},
"id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId",
"type": "Microsoft.Authorization/denyAssignments",
"name": "denyAssignmentId"
}
Definitions
Name | Description |
---|---|
Deny |
Deny Assignment |
Deny |
Deny assignment permissions. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Principal |
The name of the entity last modified it |
DenyAssignment
Deny Assignment
Name | Type | Description |
---|---|---|
id |
string |
The deny assignment ID. |
name |
string |
The deny assignment name. |
properties.condition |
string |
The conditions on the deny assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container' |
properties.conditionVersion |
string |
Version of the condition. |
properties.createdBy |
string |
Id of the user who created the assignment |
properties.createdOn |
string |
Time it was created |
properties.denyAssignmentName |
string |
The display name of the deny assignment. |
properties.description |
string |
The description of the deny assignment. |
properties.doNotApplyToChildScopes |
boolean |
Determines if the deny assignment applies to child scopes. Default value is false. |
properties.excludePrincipals |
Array of principals to which the deny assignment does not apply. |
|
properties.isSystemProtected |
boolean |
Specifies whether this deny assignment was created by Azure and cannot be edited or deleted. |
properties.permissions |
An array of permissions that are denied by the deny assignment. |
|
properties.principals |
Array of principals to which the deny assignment applies. |
|
properties.scope |
string |
The deny assignment scope. |
properties.updatedBy |
string |
Id of the user who updated the assignment |
properties.updatedOn |
string |
Time it was updated |
type |
string |
The deny assignment type. |
DenyAssignmentPermission
Deny assignment permissions.
Name | Type | Description |
---|---|---|
actions |
string[] |
Actions to which the deny assignment does not grant access. |
condition |
string |
The conditions on the Deny assignment permission. This limits the resources it applies to. |
conditionVersion |
string |
Version of the condition. |
dataActions |
string[] |
Data actions to which the deny assignment does not grant access. |
notActions |
string[] |
Actions to exclude from that the deny assignment does not grant access. |
notDataActions |
string[] |
Data actions to exclude from that the deny assignment does not grant access. |
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. |
Principal
The name of the entity last modified it
Name | Type | Description |
---|---|---|
displayName |
string |
The name of the principal made changes |
string |
Email of principal |
|
id |
string |
The id of the principal made changes |
type |
string |
Type of principal such as user , group etc |