Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-EntraAgentIdentityBlueprint

Gets an Agent Identity Blueprint by its ID.

Syntax

Default (Default)

Get-EntraAgentIdentityBlueprint

 [-BlueprintId <String>]
 [<CommonParameters>]

Description

The Get-EntraAgentIdentityBlueprint cmdlet retrieves an Agent Identity Blueprint from Microsoft Graph using the v1.0 API and the provided Blueprint ID. If no ID is provided, it uses the stored blueprint ID from the current session or prompts for one. Returns the blueprint object if found, or throws an error if not found.

Examples

Example 1: Get an Agent Identity Blueprint by ID

Connect-Entra -Scopes 'Application.Read.All'
Get-EntraAgentIdentityBlueprint -BlueprintId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb"

This example retrieves the Agent Identity Blueprint with the specified ID.

Example 2: Get the blueprint from the current session

Connect-Entra -Scopes 'AgentIdentityBlueprint.Create'
New-EntraAgentIdentityBlueprint -DisplayName "My Blueprint" -SponsorUserIds @("admin@contoso.com")
$blueprint = Get-EntraAgentIdentityBlueprint
Write-Host "Blueprint: $($blueprint.displayName)"

This example retrieves the Agent Identity Blueprint that was created in the current session using the stored blueprint ID.

Example 3: Get an Agent Identity Blueprint with error handling

Connect-Entra -Scopes 'Application.Read.All'
try {
 $blueprint = Get-EntraAgentIdentityBlueprint -BlueprintId "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb"
 Write-Host "Blueprint found: $($blueprint.displayName)"
} catch {
 Write-Host "Blueprint not found or error occurred: $_"
}

This example demonstrates how to retrieve an Agent Identity Blueprint with error handling to catch cases where the blueprint doesn't exist.

Parameters

-BlueprintId

The ID of the Agent Identity Blueprint to retrieve. If not provided, uses the stored blueprint ID from the current session or prompts for one.

Parameter properties

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

Parameter sets

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.

Inputs

None

Outputs

System.Object

Returns the Agent Identity Blueprint object with properties including id, appId, displayName, createdDateTime, and requiredResourceAccess.

Notes

If the Agent Identity Blueprint with the specified ID is not found, the cmdlet will throw an error.

This cmdlet uses the Microsoft Graph v1.0 API endpoint (/v1.0/applications/microsoft.graph.agentIdentityBlueprint).

This cmdlet requires the following Microsoft Graph permissions:

  • Application.Read.All

Related Links


Feedback

Was this page helpful?