Add-EntraBetaClientSecretToAgentIdentityBlueprint
Adds a client secret to the current Agent Identity Blueprint.
Syntax
Default (Default)
Add-EntraBetaClientSecretToAgentIdentityBlueprint
[-AgentBlueprintId <String>]
[<CommonParameters>]
Description
The Add-EntraBetaClientSecretToAgentIdentityBlueprint cmdlet creates an application password for the most recently created Agent Identity Blueprint using New-MgApplicationPassword. Uses the stored AgentBlueprintId from the last New-AgentIdentityBlueprint call.
Examples
Example 1: Add a client secret using stored blueprint ID
Connect-Entra -Scopes 'AgentIdentityBlueprint.AddRemoveCreds.All'
New-EntraBetaAgentIdentityBlueprint -DisplayName "My Blueprint" -SponsorUserIds @("user1@contoso.com")
Add-EntraBetaClientSecretToAgentIdentityBlueprint
This example adds a client secret to the Agent Identity Blueprint that was just created. The cmdlet uses the stored blueprint ID from the last blueprint creation.
Example 2: Add a client secret using specific blueprint ID
Connect-Entra -Scopes 'AgentIdentityBlueprint.AddRemoveCreds.All'
Add-EntraBetaClientSecretToAgentIdentityBlueprint -AgentBlueprintId "12345678-1234-1234-1234-123456789012"
This example adds a client secret to the specified Agent Identity Blueprint by providing an explicit AgentBlueprintId parameter.
Parameters
-AgentBlueprintId
The ID of the Agent Identity Blueprint to add the secret to. If not provided, uses the stored ID from the last blueprint creation.
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 secret result object with KeyId, EndDateTime, and SecretText properties.
Notes
This cmdlet requires the following Microsoft Graph permission:
- Application.ReadWrite.All
The client secret is valid for 90 days by default. The secret is returned only once and should be stored securely.