Edit

Share via


New-EntraApplicationKeyCredential

Creates a key credential for an application.

Syntax

Default (Default)

New-EntraApplicationKeyCredential

    -ApplicationId <String>
    [-CustomKeyIdentifier <String>]
    [-Type <KeyType>]
    [-Usage <KeyUsage>]
    [-Value <String>]
    [-EndDate <DateTime>]
    [-StartDate <DateTime>]
    [<CommonParameters>]

Description

The New-EntraApplicationKeyCredential cmdlet creates a key credential for an application.

An application can use this command along with Remove-EntraApplicationKeyCredential to automate the rolling of its expiring keys.

As part of the request validation, proof of possession of an existing key is verified before the action can be performed.

Parameters

-ApplicationId

Specifies a unique ID of an application in Microsoft Entra ID.

Parameter properties

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

Parameter sets

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

-CustomKeyIdentifier

Specifies a custom key ID.

Parameter properties

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

Parameter sets

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

-EndDate

Specifies the time when the key becomes invalid as a DateTime object.

Parameter properties

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

Parameter sets

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

-StartDate

Specifies the time when the key becomes valid as a DateTime object.

Parameter properties

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

Parameter sets

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

-Type

Specifies the type of the key.

Parameter properties

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

Parameter sets

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

-Usage

Specifies the key usage.

  • AsymmetricX509Cert: The usage must be Verify.
  • X509CertAndPassword: The usage must be Sign.

Parameter properties

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

Parameter sets

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

-Value

Specifies the value for the key.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:True
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.