Get-AzADAppCredential
Retrieves a list of credentials associated with an application.
Warning
There are upcoming breaking changes in this cmdlet. These changes are currently in preview with Az.Resources version 5.0.0-preview. They will become generally available with our next major release of the Az PowerShell module, version 7.x in December of 2021. For more information, see Azure AD to Microsoft Graph migration changes in Azure PowerShell.
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Get-AzADAppCredential
-ObjectId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzADAppCredential
-ApplicationId <Guid>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzADAppCredential
-DisplayName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzADAppCredential
-ApplicationObject <PSADApplication>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzADAppCredential cmdlet can be used to retrieve a list of credentials associated with an application. This command will retrieve all of the credential properties (but not the credential value) associated with the application.
Examples
Example 1: Get application credentials by object id
PS C:\> Get-AzADAppCredential -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476
Returns a list of credentials associated with the application having object id '1f99cf81-0146-4f4e-beae-2007d0668476'.
Example 2: Get application credentials by piping
PS C:\> Get-AzADApplication -ObjectId 1f99cf81-0146-4f4e-beae-2007d0668476 | Get-AzADAppCredential
Gets the application with object id '1f99cf81-0146-4f4e-beae-2007d0668476' and pipes it to the Get-AzADAppCredential cmdlet to list all of the credentials for that application.
Parameters
The id of the application to retrieve credentials from.
| Type: | Guid |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The application object to retrieve credentials from.
| Type: | PSADApplication |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with azure
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
The display name of the application.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
The object id of the application to retrieve credentials from.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |