Note

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

Access to this page requires authorization. You can try .

New-EntraApplicationPassword

Adds a strong password to an application.

Syntax

Default (Default)

New-EntraApplicationPassword

 -ApplicationId <String>
 -PasswordCredential <PasswordCredential>
 [<CommonParameters>]

Description

Adds a strong password to an application.

Examples

Example 1: Add a password to an application

Connect-Entra -Scopes 'Application.ReadWrite.All','Directory.ReadWrite.All'
$application = Get-EntraApplication -Filter "DisplayName eq 'Contoso Helpdesk Application'"
$passwordCredential= New-Object Microsoft.Open.MSGraph.Model.PasswordCredential
$passwordCredential.StartDateTime = Get-Date -Year 2024 -Month 10 -Day 23
$passwordCredential.EndDateTime = Get-Date -Year 2025 -Month 2 -Day 28
$passwordCredential.CustomKeyIdentifier = [System.Text.Encoding]::UTF8.GetBytes('Analytics App Password')
$passwordCredential.Hint = 'analytics'
$passwordCredential.DisplayName = 'Analytics App Password'
New-EntraApplicationPassword -ApplicationId $application.Id -PasswordCredential $passwordCredential
CustomKeyIdentifier DisplayName EndDateTime Hint KeyId SecretText StartDateTime
------------------- ----------- ----------- ---- ----- ---------- -------------
{97} 2/28/2025 7:05:39 AM nnW bbbbbbbb-1c1c-2d2d-3e3e-444444444444 <my-secret-text> 12/28/2024 7:05:39 AM

This example adds a password to the specified application.

  • -ApplicationId parameter specifies the unique identifier of the application.
  • -PasswordCredential parameter specifies a password credential associated with an application or a service principal.

Parameters

-ApplicationId

The unique identifier of the application object.

Parameter properties

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

Parameter sets

-PasswordCredential

Represents a password credential associated with an application or a service principal.

Parameter properties

Type:PasswordCredential
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

String

Microsoft.Open.MSGraph.Model.PasswordCredential

Related Links


Feedback

Was this page helpful?