# StorageAccountProxy.createRoleAssignment

- Module: [Aspire.Hosting.Azure.Provisioning.Storage](/reference/api/typescript/aspire.hosting.azure.provisioning.storage.md)
- Defined on: [StorageAccountProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.storage/storageaccountproxy.md)
- Version: `17.0.0-preview.1.26567.5`
- Kind: `method`

Invokes CreateRoleAssignment on the StorageAccount provisioning model.

## Definition

```typescript
interface StorageAccountProxy {
  // ... omitted for brevity
  createRoleAssignment(
      role: StorageBuiltInRoleProxy,
      principalType: BicepValueProxy | RoleManagementPrincipalType,
      principalId: BicepValueProxy | guid,
      bicepIdentifierSuffix: string): StorageRoleAssignmentProxy;
}
```

## Signature

```typescript
createRoleAssignment(
    role: StorageBuiltInRoleProxy,
    principalType: BicepValueProxy | RoleManagementPrincipalType,
    principalId: BicepValueProxy | guid,
    bicepIdentifierSuffix: string): StorageRoleAssignmentProxy
```

## Parameters

- `role` ([StorageBuiltInRoleProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.storage/storagebuiltinroleproxy.md))
- `principalType` (`BicepValueProxy | RoleManagementPrincipalType`)
- `principalId` (`BicepValueProxy | guid`)
- `bicepIdentifierSuffix` (`string`)

## Returns

[StorageRoleAssignmentProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.storage/storageroleassignmentproxy.md)

## Defined on

- [StorageAccountProxy](/reference/api/typescript/aspire.hosting.azure.provisioning.storage/storageaccountproxy.md) -- `handle`
