New-EntraBetaApplicationPasswordCredential
Creates a password credential for an application.
Syntax
New-EntraBetaApplicationPasswordCredential
-ApplicationId <String>
[-CustomKeyIdentifier <String>]
[-StartDate <DateTime>]
[-EndDate <DateTime>]
[<CommonParameters>]
Description
The New-EntraBetaApplicationPasswordCredential
cmdlet creates a password credential for an application in Microsoft Entra ID.
Examples
Example 1: Create a password credential
Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraBetaApplication -Filter "displayName eq '<displayName>'"
New-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id
CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime
------------------- ----------- ----------- ---- ----- ---------- -------------
3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM
This command creates new password credential for specified application.
-ApplicationId
Specifies the ID of an application.
Example 2: Create a password credential using CustomKeyIdentifier parameter
Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraBetaApplication -Filter "displayName eq '<displayName>'"
New-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id -CustomKeyIdentifier '<userfriendlyDisplayName>'
CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDat
eTime
------------------- ----------- ----------- ---- ----- ---------- --------
100 101 109 111 80 97 115 115 119 111 114 100 demoPassword 6/10/2026 7:43:45 AM 9tb tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_EaU6cqG 6/10/...
This command creates new password credential for specified application.
-ApplicationId
Specifies the ID of an application.-CustomKeyIdentifier
Speicifies unique binary identifier.
Example 3: Create a password credential using StartDate parameter
Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraBetaApplication -Filter "displayName eq '<displayName>'"
$startDate = (Get-Date).AddYears(0)
New-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id -CustomKeyIdentifier '<userfriendlyDisplayName>' -StartDate $startDate
CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime
------------------- ----------- ----------- ---- ----- ---------- -------------
3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM
This command creates new password credential for specified application.
-ApplicationId
Specifies the ID of an application.-StartDate
Speicifies the date and time at which the password becomes valid.
Example 4: Create a password credential using EndDate parameter
Connect-Entra -Scopes 'Application.ReadWrite.All','Application.ReadWrite.OwnedBy'
$application = Get-EntraBetaApplication -Filter "displayName eq '<displayName>'"
$endDate = (Get-Date).AddYears(2)
New-EntraBetaApplicationPasswordCredential -ApplicationId $application.Id -CustomKeyIdentifier '<userfriendlyDisplayName>' -EndDate $endDate
CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime
------------------- ----------- ----------- ---- ----- ---------- -------------
3/21/2026 9:48:40 AM n34 tttttttt-0000-2222-0000-aaaaaaaaaaaa wbBNW8kCuiPjNRg9NX98W_aaaaaaa 3/21/2024 9:48:40 AM
This command creates new password credential for specified application.
-ApplicationId
Specifies the ID of an application.-EndDate
Speicifies The date and time at which the password expires.
Parameters
-ApplicationId
Specifies the ID of an application in Microsoft Entra ID.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomKeyIdentifier
A unique binary identifier.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EndDate
The date and time at which the password expires.
Type: | System.DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-StartDate
The date and time at which the password becomes valid.
Type: | System.DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |