# AzureResource.ClearDefaultRoleAssignments

- Module: [Aspire.Hosting.Azure](/reference/api/go/aspire.hosting.azure.md)
- Defined on: [AzureResource](/reference/api/go/aspire.hosting.azure/azureresource.md)
- Version: `17.0.0`
- Kind: `method`

Clears all default role assignments for the specified Azure resource.

## Remarks

This method removes all default role assignments from the Azure resource. This can be useful when
role assignments can't be created, for example on existing resources where you don't have permission
to create the assignments.

## Definition

```go
func (AzureResource) ClearDefaultRoleAssignments() AzureResource
```

## Signature

```go
ClearDefaultRoleAssignments() AzureResource
```

## Returns

[`AzureResource`](/reference/api/go/aspire.hosting.azure/azureresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.

- [AzureResource](/reference/api/go/aspire.hosting.azure/azureresource.md) -- `marker`

## Applies to

- [`AzureBicepResource`](/reference/api/go/aspire.hosting.azure/azurebicepresource.md)
- [`AzureProvisioningResource`](/reference/api/go/aspire.hosting.azure/azureprovisioningresource.md)
- [`AzureUserAssignedIdentityResource`](/reference/api/go/aspire.hosting.azure/azureuserassignedidentityresource.md)
