Edit

Share via


Get-AzUserAssignedIdentityAssociatedResource

Lists the associated resources for this identity.

Syntax

Default (Default)

Get-AzUserAssignedIdentityAssociatedResource
    -Name <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String[]>]
    [-Filter <String>]
    [-Orderby <String>]
    [-Skip <Int32>]
    [-Skiptoken <String>]
    [-Top <Int32>]
    [-DefaultProfile <PSObject>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Lists the associated resources for this identity.

Examples

Example 1: List all azure resources associated with given identity.

Get-AzUserAssignedIdentityAssociatedResource -ResourceGroupName azure-rg-test -Name uai-pwsh01
Name             ResourceGroup     SubscriptionDisplayName               SubscriptionId                       ResourceType
----             -------------     -----------------------               --------------                       ------------
appServicej6ocml identity-xcsbyfid Visual Studio Enterprise Subscription 0336439f-0e9d-44ec-975e-62accb9b3901 microsoft.web/sites
default          test-resources    Visual Studio Enterprise Subscription 0336439f-0e9d-44ec-975e-62accb9b3901 microsoft.compute/virtualmachines

This command lists all azure resources associated with given identity.

Example 2: List azure resources associated with given identity with OData expression that allows to filter by: name, type, resourceGroup, subscriptionId, subscriptionDisplayName

Get-AzUserAssignedIdentityAssociatedResource -ResourceGroupName azure-rg-test -Name uai-pwsh01 `
    -Filter "type eq 'microsoft.compute/virtualmachines' and contains(name, 'default')"
Name    ResourceGroup  SubscriptionDisplayName               SubscriptionId                       ResourceType
----    -------------  -----------------------               --------------                       ------------
default test-resources Visual Studio Enterprise Subscription 0336439f-0e9d-44ec-975e-62accb9b3901 microsoft.compute/virtualmachines

This command lists azure resources associated with given identity with OData expression that allows to filter by: name, type, resourceGroup, subscriptionId, subscriptionDisplayName

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Filter

OData filter expression to apply to the query.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

The name of the identity resource.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Orderby

OData orderBy expression to apply to the query.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the Resource Group to which the identity belongs.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Skip

Number of records to skip.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Skiptoken

A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

The Id of the Subscription to which the identity belongs.

Parameter properties

Type:

String[]

Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Top

Number of records to return.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Outputs

IAzureResource