New-EntraBetaAgentIDForAgentIdentityBlueprint
Creates a new Agent Identity using an Agent Identity Blueprint.
Syntax
Default (Default)
New-EntraBetaAgentIDForAgentIdentityBlueprint
-DisplayName <String>
[-SponsorUserIds <String[]>]
[-SponsorGroupIds <String[]>]
[-OwnerUserIds <String[]>]
[<CommonParameters>]
Description
The New-EntraBetaAgentIDForAgentIdentityBlueprint cmdlet creates a new Agent Identity by posting to the Microsoft Graph AgentIdentity endpoint using the current Agent Identity Blueprint ID and specified sponsors/owners.
Examples
Example 1: Create an agent identity with sponsors and owners
Connect-Entra -Scopes 'AgentIdentityBlueprint.Create', 'AgentIdentityBlueprint.ReadWrite.All', 'User.ReadWrite.All'
New-EntraBetaAgentIdentityBlueprint -DisplayName "My Blueprint" -SponsorUserIds @("admin@contoso.com")
New-EntraBetaAgentIDForAgentIdentityBlueprint -DisplayName "My Agent Identity" -SponsorUserIds @("user1@contoso.com") -OwnerUserIds @("owner1@contoso.com")
This example creates an Agent Identity with the specified display name, sponsors, and owners using the Agent Identity Blueprint created in the current session.
Example 2: Create an agent identity with user and group sponsors
Connect-Entra -Scopes 'AgentIdentityBlueprint.Create', 'AgentIdentityBlueprint.ReadWrite.All', 'User.ReadWrite.All'
New-EntraBetaAgentIDForAgentIdentityBlueprint -DisplayName "HR Agent" -SponsorUserIds @("hr-admin@contoso.com") -SponsorGroupIds @("aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb")
This example creates an Agent Identity with both user and group sponsors.
Example 3: Create an agent identity with prompts
Connect-Entra -Scopes 'AgentIdentityBlueprint.Create', 'AgentIdentityBlueprint.ReadWrite.All', 'User.ReadWrite.All'
New-EntraBetaAgentIdentityBlueprint -DisplayName "Finance Blueprint" -SponsorUserIds @("finance-admin@contoso.com")
New-EntraBetaAgentIDForAgentIdentityBlueprint -DisplayName "Finance Agent"
This example creates an Agent Identity. The cmdlet will prompt for sponsors and owners if not provided.
Parameters
-DisplayName
The display name for the Agent Identity.
Parameter properties
| Type: | System.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 |
-OwnerUserIds
Array of user IDs to set as owners.
Parameter properties
| Type: | System.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 |
-SponsorGroupIds
Array of group IDs to set as sponsors.
Parameter properties
| Type: | System.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 |
-SponsorUserIds
Array of user IDs to set as sponsors.
Parameter properties
| Type: | System.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 |
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 object with properties including id, displayName, appId, and AgentIdentityBlueprintId.
Notes
Requires an Agent Identity Blueprint to be created first (uses stored blueprint ID). At least one owner or sponsor (user or group) must be specified. The cmdlet stores the Agent Identity ID in a module-level variable for use by other related cmdlets.
This cmdlet requires the following Microsoft Graph permissions:
- AgentIdentityBlueprint.Create
- Application.ReadWrite.All