published on Thursday, Aug 13, 2026 by Pulumi
published on Thursday, Aug 13, 2026 by Pulumi
Role Assignments
Uses Azure REST API version 2022-04-01. In version 2.x of the Azure Native provider, it used API version 2022-04-01.
Other available API versions: 2020-08-01-preview, 2020-10-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native authorization [ApiVersion]. See the version guide for details.
Example Usage
Create role assignment for resource
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var roleAssignment = new AzureNative.Authorization.RoleAssignment("roleAssignment", new()
{
PrincipalId = "ce2ce14e-85d7-4629-bdbc-454d0519d987",
PrincipalType = AzureNative.Authorization.PrincipalType.User,
RoleAssignmentName = "05c5a614-a7d6-4502-b150-c2fb455033ff",
RoleDefinitionId = "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
Scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account",
});
});
package main
import (
authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := authorization.NewRoleAssignment(ctx, "roleAssignment", &authorization.RoleAssignmentArgs{
PrincipalId: pulumi.String("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
PrincipalType: pulumi.String(authorization.PrincipalTypeUser),
RoleAssignmentName: pulumi.String("05c5a614-a7d6-4502-b150-c2fb455033ff"),
RoleDefinitionId: pulumi.String("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
Scope: pulumi.String("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_authorization_roleassignment" "roleAssignment" {
principal_id = "ce2ce14e-85d7-4629-bdbc-454d0519d987"
principal_type = "User"
role_assignment_name = "05c5a614-a7d6-4502-b150-c2fb455033ff"
role_definition_id = "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"
scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.authorization.RoleAssignment;
import com.pulumi.azurenative.authorization.RoleAssignmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var roleAssignment = new RoleAssignment("roleAssignment", RoleAssignmentArgs.builder()
.principalId("ce2ce14e-85d7-4629-bdbc-454d0519d987")
.principalType("User")
.roleAssignmentName("05c5a614-a7d6-4502-b150-c2fb455033ff")
.roleDefinitionId("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d")
.scope("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const roleAssignment = new azure_native.authorization.RoleAssignment("roleAssignment", {
principalId: "ce2ce14e-85d7-4629-bdbc-454d0519d987",
principalType: azure_native.authorization.PrincipalType.User,
roleAssignmentName: "05c5a614-a7d6-4502-b150-c2fb455033ff",
roleDefinitionId: "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
scope: "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account",
});
import pulumi
import pulumi_azure_native as azure_native
role_assignment = azure_native.authorization.RoleAssignment("roleAssignment",
principal_id="ce2ce14e-85d7-4629-bdbc-454d0519d987",
principal_type=azure_native.authorization.PrincipalType.USER,
role_assignment_name="05c5a614-a7d6-4502-b150-c2fb455033ff",
role_definition_id="/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
scope="subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account")
resources:
roleAssignment:
type: azure-native:authorization:RoleAssignment
properties:
principalId: ce2ce14e-85d7-4629-bdbc-454d0519d987
principalType: User
roleAssignmentName: 05c5a614-a7d6-4502-b150-c2fb455033ff
roleDefinitionId: /subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d
scope: subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account
Create role assignment for resource group
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var roleAssignment = new AzureNative.Authorization.RoleAssignment("roleAssignment", new()
{
PrincipalId = "ce2ce14e-85d7-4629-bdbc-454d0519d987",
PrincipalType = AzureNative.Authorization.PrincipalType.User,
RoleAssignmentName = "05c5a614-a7d6-4502-b150-c2fb455033ff",
RoleDefinitionId = "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
Scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg",
});
});
package main
import (
authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := authorization.NewRoleAssignment(ctx, "roleAssignment", &authorization.RoleAssignmentArgs{
PrincipalId: pulumi.String("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
PrincipalType: pulumi.String(authorization.PrincipalTypeUser),
RoleAssignmentName: pulumi.String("05c5a614-a7d6-4502-b150-c2fb455033ff"),
RoleDefinitionId: pulumi.String("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
Scope: pulumi.String("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_authorization_roleassignment" "roleAssignment" {
principal_id = "ce2ce14e-85d7-4629-bdbc-454d0519d987"
principal_type = "User"
role_assignment_name = "05c5a614-a7d6-4502-b150-c2fb455033ff"
role_definition_id = "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"
scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.authorization.RoleAssignment;
import com.pulumi.azurenative.authorization.RoleAssignmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var roleAssignment = new RoleAssignment("roleAssignment", RoleAssignmentArgs.builder()
.principalId("ce2ce14e-85d7-4629-bdbc-454d0519d987")
.principalType("User")
.roleAssignmentName("05c5a614-a7d6-4502-b150-c2fb455033ff")
.roleDefinitionId("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d")
.scope("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const roleAssignment = new azure_native.authorization.RoleAssignment("roleAssignment", {
principalId: "ce2ce14e-85d7-4629-bdbc-454d0519d987",
principalType: azure_native.authorization.PrincipalType.User,
roleAssignmentName: "05c5a614-a7d6-4502-b150-c2fb455033ff",
roleDefinitionId: "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
scope: "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg",
});
import pulumi
import pulumi_azure_native as azure_native
role_assignment = azure_native.authorization.RoleAssignment("roleAssignment",
principal_id="ce2ce14e-85d7-4629-bdbc-454d0519d987",
principal_type=azure_native.authorization.PrincipalType.USER,
role_assignment_name="05c5a614-a7d6-4502-b150-c2fb455033ff",
role_definition_id="/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
scope="subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg")
resources:
roleAssignment:
type: azure-native:authorization:RoleAssignment
properties:
principalId: ce2ce14e-85d7-4629-bdbc-454d0519d987
principalType: User
roleAssignmentName: 05c5a614-a7d6-4502-b150-c2fb455033ff
roleDefinitionId: /subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d
scope: subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg
Create role assignment for subscription
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var roleAssignment = new AzureNative.Authorization.RoleAssignment("roleAssignment", new()
{
PrincipalId = "ce2ce14e-85d7-4629-bdbc-454d0519d987",
PrincipalType = AzureNative.Authorization.PrincipalType.User,
RoleAssignmentName = "05c5a614-a7d6-4502-b150-c2fb455033ff",
RoleDefinitionId = "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
Scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
});
});
package main
import (
authorization "github.com/pulumi/pulumi-azure-native-sdk/authorization/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := authorization.NewRoleAssignment(ctx, "roleAssignment", &authorization.RoleAssignmentArgs{
PrincipalId: pulumi.String("ce2ce14e-85d7-4629-bdbc-454d0519d987"),
PrincipalType: pulumi.String(authorization.PrincipalTypeUser),
RoleAssignmentName: pulumi.String("05c5a614-a7d6-4502-b150-c2fb455033ff"),
RoleDefinitionId: pulumi.String("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"),
Scope: pulumi.String("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_authorization_roleassignment" "roleAssignment" {
principal_id = "ce2ce14e-85d7-4629-bdbc-454d0519d987"
principal_type = "User"
role_assignment_name = "05c5a614-a7d6-4502-b150-c2fb455033ff"
role_definition_id = "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d"
scope = "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.authorization.RoleAssignment;
import com.pulumi.azurenative.authorization.RoleAssignmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var roleAssignment = new RoleAssignment("roleAssignment", RoleAssignmentArgs.builder()
.principalId("ce2ce14e-85d7-4629-bdbc-454d0519d987")
.principalType("User")
.roleAssignmentName("05c5a614-a7d6-4502-b150-c2fb455033ff")
.roleDefinitionId("/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d")
.scope("subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const roleAssignment = new azure_native.authorization.RoleAssignment("roleAssignment", {
principalId: "ce2ce14e-85d7-4629-bdbc-454d0519d987",
principalType: azure_native.authorization.PrincipalType.User,
roleAssignmentName: "05c5a614-a7d6-4502-b150-c2fb455033ff",
roleDefinitionId: "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
scope: "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2",
});
import pulumi
import pulumi_azure_native as azure_native
role_assignment = azure_native.authorization.RoleAssignment("roleAssignment",
principal_id="ce2ce14e-85d7-4629-bdbc-454d0519d987",
principal_type=azure_native.authorization.PrincipalType.USER,
role_assignment_name="05c5a614-a7d6-4502-b150-c2fb455033ff",
role_definition_id="/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d",
scope="subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2")
resources:
roleAssignment:
type: azure-native:authorization:RoleAssignment
properties:
principalId: ce2ce14e-85d7-4629-bdbc-454d0519d987
principalType: User
roleAssignmentName: 05c5a614-a7d6-4502-b150-c2fb455033ff
roleDefinitionId: /subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d
scope: subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2
Create RoleAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoleAssignment(name: string, args: RoleAssignmentArgs, opts?: CustomResourceOptions);@overload
def RoleAssignment(resource_name: str,
args: RoleAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoleAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
principal_id: Optional[str] = None,
role_definition_id: Optional[str] = None,
scope: Optional[str] = None,
condition: Optional[str] = None,
condition_version: Optional[str] = None,
delegated_managed_identity_resource_id: Optional[str] = None,
description: Optional[str] = None,
principal_type: Optional[Union[str, PrincipalType]] = None,
role_assignment_name: Optional[str] = None)func NewRoleAssignment(ctx *Context, name string, args RoleAssignmentArgs, opts ...ResourceOption) (*RoleAssignment, error)public RoleAssignment(string name, RoleAssignmentArgs args, CustomResourceOptions? opts = null)
public RoleAssignment(String name, RoleAssignmentArgs args)
public RoleAssignment(String name, RoleAssignmentArgs args, CustomResourceOptions options)
type: azure-native:authorization:RoleAssignment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_authorization_role_assignment" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var roleAssignmentResource = new AzureNative.Authorization.RoleAssignment("roleAssignmentResource", new()
{
PrincipalId = "string",
RoleDefinitionId = "string",
Scope = "string",
Condition = "string",
ConditionVersion = "string",
DelegatedManagedIdentityResourceId = "string",
Description = "string",
PrincipalType = "string",
RoleAssignmentName = "string",
});
example, err := authorization.NewRoleAssignment(ctx, "roleAssignmentResource", &authorization.RoleAssignmentArgs{
PrincipalId: pulumi.String("string"),
RoleDefinitionId: pulumi.String("string"),
Scope: pulumi.String("string"),
Condition: pulumi.String("string"),
ConditionVersion: pulumi.String("string"),
DelegatedManagedIdentityResourceId: pulumi.String("string"),
Description: pulumi.String("string"),
PrincipalType: pulumi.String("string"),
RoleAssignmentName: pulumi.String("string"),
})
resource "azure-native_authorization_role_assignment" "roleAssignmentResource" {
lifecycle {
create_before_destroy = true
}
principal_id = "string"
role_definition_id = "string"
scope = "string"
condition = "string"
condition_version = "string"
delegated_managed_identity_resource_id = "string"
description = "string"
principal_type = "string"
role_assignment_name = "string"
}
var roleAssignmentResource = new com.pulumi.azurenative.authorization.RoleAssignment("roleAssignmentResource", com.pulumi.azurenative.authorization.RoleAssignmentArgs.builder()
.principalId("string")
.roleDefinitionId("string")
.scope("string")
.condition("string")
.conditionVersion("string")
.delegatedManagedIdentityResourceId("string")
.description("string")
.principalType("string")
.roleAssignmentName("string")
.build());
role_assignment_resource = azure_native.authorization.RoleAssignment("roleAssignmentResource",
principal_id="string",
role_definition_id="string",
scope="string",
condition="string",
condition_version="string",
delegated_managed_identity_resource_id="string",
description="string",
principal_type="string",
role_assignment_name="string")
const roleAssignmentResource = new azure_native.authorization.RoleAssignment("roleAssignmentResource", {
principalId: "string",
roleDefinitionId: "string",
scope: "string",
condition: "string",
conditionVersion: "string",
delegatedManagedIdentityResourceId: "string",
description: "string",
principalType: "string",
roleAssignmentName: "string",
});
type: azure-native:authorization:RoleAssignment
properties:
condition: string
conditionVersion: string
delegatedManagedIdentityResourceId: string
description: string
principalId: string
principalType: string
roleAssignmentName: string
roleDefinitionId: string
scope: string
RoleAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RoleAssignment resource accepts the following input properties:
- Principal
Id string - The principal ID.
- Role
Definition stringId - The role definition ID.
- Scope string
- The fully qualified Azure Resource manager identifier of the resource.
- Condition string
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- Condition
Version string - Version of the condition. Currently the only accepted value is '2.0'
- Delegated
Managed stringIdentity Resource Id - Id of the delegated managed identity resource
- Description string
- Description of role assignment
- Principal
Type string | Pulumi.Azure Native. Authorization. Principal Type - The principal type of the assigned principal ID.
- Role
Assignment stringName - The name of the role assignment. It can be any valid GUID.
- Principal
Id string - The principal ID.
- Role
Definition stringId - The role definition ID.
- Scope string
- The fully qualified Azure Resource manager identifier of the resource.
- Condition string
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- Condition
Version string - Version of the condition. Currently the only accepted value is '2.0'
- Delegated
Managed stringIdentity Resource Id - Id of the delegated managed identity resource
- Description string
- Description of role assignment
- Principal
Type string | PrincipalType - The principal type of the assigned principal ID.
- Role
Assignment stringName - The name of the role assignment. It can be any valid GUID.
- principal_
id string - The principal ID.
- role_
definition_ stringid - The role definition ID.
- scope string
- The fully qualified Azure Resource manager identifier of the resource.
- condition string
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- condition_
version string - Version of the condition. Currently the only accepted value is '2.0'
- delegated_
managed_ stringidentity_ resource_ id - Id of the delegated managed identity resource
- description string
- Description of role assignment
- principal_
type string | "User" | "Group" | "ServicePrincipal" | "Foreign Group" | "Device" | "Agent User" | "Agent Service Principal" - The principal type of the assigned principal ID.
- role_
assignment_ stringname - The name of the role assignment. It can be any valid GUID.
- principal
Id String - The principal ID.
- role
Definition StringId - The role definition ID.
- scope String
- The fully qualified Azure Resource manager identifier of the resource.
- condition String
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- condition
Version String - Version of the condition. Currently the only accepted value is '2.0'
- delegated
Managed StringIdentity Resource Id - Id of the delegated managed identity resource
- description String
- Description of role assignment
- principal
Type String | PrincipalType - The principal type of the assigned principal ID.
- role
Assignment StringName - The name of the role assignment. It can be any valid GUID.
- principal
Id string - The principal ID.
- role
Definition stringId - The role definition ID.
- scope string
- The fully qualified Azure Resource manager identifier of the resource.
- condition string
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- condition
Version string - Version of the condition. Currently the only accepted value is '2.0'
- delegated
Managed stringIdentity Resource Id - Id of the delegated managed identity resource
- description string
- Description of role assignment
- principal
Type string | PrincipalType - The principal type of the assigned principal ID.
- role
Assignment stringName - The name of the role assignment. It can be any valid GUID.
- principal_
id str - The principal ID.
- role_
definition_ strid - The role definition ID.
- scope str
- The fully qualified Azure Resource manager identifier of the resource.
- condition str
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- condition_
version str - Version of the condition. Currently the only accepted value is '2.0'
- delegated_
managed_ stridentity_ resource_ id - Id of the delegated managed identity resource
- description str
- Description of role assignment
- principal_
type str | PrincipalType - The principal type of the assigned principal ID.
- role_
assignment_ strname - The name of the role assignment. It can be any valid GUID.
- principal
Id String - The principal ID.
- role
Definition StringId - The role definition ID.
- scope String
- The fully qualified Azure Resource manager identifier of the resource.
- condition String
- The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'
- condition
Version String - Version of the condition. Currently the only accepted value is '2.0'
- delegated
Managed StringIdentity Resource Id - Id of the delegated managed identity resource
- description String
- Description of role assignment
- principal
Type String | "User" | "Group" | "ServicePrincipal" | "Foreign Group" | "Device" | "Agent User" | "Agent Service Principal" - The principal type of the assigned principal ID.
- role
Assignment StringName - The name of the role assignment. It can be any valid GUID.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleAssignment resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Created
By string - Id of the user who created the assignment
- Created
On string - Time it was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- System
Data Pulumi.Azure Native. Authorization. Outputs. System Data Response - 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"
- Updated
By string - Id of the user who updated the assignment
- Updated
On string - Time it was updated
- Azure
Api stringVersion - The Azure API version of the resource.
- Created
By string - Id of the user who created the assignment
- Created
On string - Time it was created
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the resource
- System
Data SystemData Response - 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"
- Updated
By string - Id of the user who updated the assignment
- Updated
On string - Time it was updated
- azure_
api_ stringversion - The Azure API version of the resource.
- created_
by string - Id of the user who created the assignment
- created_
on string - Time it was created
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- system_
data object - 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"
- updated_
by string - Id of the user who updated the assignment
- updated_
on string - Time it was updated
- azure
Api StringVersion - The Azure API version of the resource.
- created
By String - Id of the user who created the assignment
- created
On String - Time it was created
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- system
Data SystemData Response - 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"
- updated
By String - Id of the user who updated the assignment
- updated
On String - Time it was updated
- azure
Api stringVersion - The Azure API version of the resource.
- created
By string - Id of the user who created the assignment
- created
On string - Time it was created
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the resource
- system
Data SystemData Response - 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"
- updated
By string - Id of the user who updated the assignment
- updated
On string - Time it was updated
- azure_
api_ strversion - The Azure API version of the resource.
- created_
by str - Id of the user who created the assignment
- created_
on str - Time it was created
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the resource
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- updated_
by str - Id of the user who updated the assignment
- updated_
on str - Time it was updated
- azure
Api StringVersion - The Azure API version of the resource.
- created
By String - Id of the user who created the assignment
- created
On String - Time it was created
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the resource
- system
Data Property Map - 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"
- updated
By String - Id of the user who updated the assignment
- updated
On String - Time it was updated
Supporting Types
PrincipalType, PrincipalTypeArgs
- User
UserUser- Group
GroupGroup- Service
Principal ServicePrincipalServicePrincipal- Foreign
Group ForeignGroupForeignGroup- Device
DeviceDevice- Agent
User AgentUserAgent identity derived from a user.- Agent
Service Principal AgentServicePrincipalAgent identity derived from a service principal.
- Principal
Type User UserUser- Principal
Type Group GroupGroup- Principal
Type Service Principal ServicePrincipalServicePrincipal- Principal
Type Foreign Group ForeignGroupForeignGroup- Principal
Type Device DeviceDevice- Principal
Type Agent User AgentUserAgent identity derived from a user.- Principal
Type Agent Service Principal AgentServicePrincipalAgent identity derived from a service principal.
- "User"
UserUser- "Group"
GroupGroup- "Service
Principal" ServicePrincipalServicePrincipal- "Foreign
Group" ForeignGroupForeignGroup- "Device"
DeviceDevice- "Agent
User" AgentUserAgent identity derived from a user.- "Agent
Service Principal" AgentServicePrincipalAgent identity derived from a service principal.
- User
UserUser- Group
GroupGroup- Service
Principal ServicePrincipalServicePrincipal- Foreign
Group ForeignGroupForeignGroup- Device
DeviceDevice- Agent
User AgentUserAgent identity derived from a user.- Agent
Service Principal AgentServicePrincipalAgent identity derived from a service principal.
- User
UserUser- Group
GroupGroup- Service
Principal ServicePrincipalServicePrincipal- Foreign
Group ForeignGroupForeignGroup- Device
DeviceDevice- Agent
User AgentUserAgent identity derived from a user.- Agent
Service Principal AgentServicePrincipalAgent identity derived from a service principal.
- USER
UserUser- GROUP
GroupGroup- SERVICE_PRINCIPAL
ServicePrincipalServicePrincipal- FOREIGN_GROUP
ForeignGroupForeignGroup- DEVICE
DeviceDevice- AGENT_USER
AgentUserAgent identity derived from a user.- AGENT_SERVICE_PRINCIPAL
AgentServicePrincipalAgent identity derived from a service principal.
- "User"
UserUser- "Group"
GroupGroup- "Service
Principal" ServicePrincipalServicePrincipal- "Foreign
Group" ForeignGroupForeignGroup- "Device"
DeviceDevice- "Agent
User" AgentUserAgent identity derived from a user.- "Agent
Service Principal" AgentServicePrincipalAgent identity derived from a service principal.
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at string - The timestamp of resource creation (UTC).
- created_
by string - The identity that created the resource.
- created_
by_ stringtype - The type of identity that created the resource.
- last_
modified_ stringat - The timestamp of resource last modification (UTC)
- last_
modified_ stringby - The identity that last modified the resource.
- last_
modified_ stringby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:authorization:RoleAssignment 05c5a614-a7d6-4502-b150-c2fb455033ff /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
published on Thursday, Aug 13, 2026 by Pulumi