AADApplicationFederatedIdentityCredential¶
Parameters¶
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| ApplicationDisplayName | Key | String | Display name of the Azure AD application that owns the federated identity credential. | |
| Name | Key | String | The unique name of the federated identity credential. | |
| ApplicationObjectId | Write | String | Object ID of the Azure AD application that owns the federated identity credential. | |
| Id | Write | String | The unique identifier of the federated identity credential. | |
| Issuer | Write | String | The issuer URL of the external identity provider. | |
| Subject | Write | String | The subject identifier of the external workload. | |
| Audiences | Write | StringArray[] | The audiences that can appear in the external token. | |
| Description | Write | String | The description of the federated identity credential. | |
| Ensure | Write | String | Specify if the federated identity credential should exist or not. | Present, Absent |
| Credential | Write | PSCredential | Credentials for the Microsoft Graph delegated permissions. | |
| ApplicationId | Write | String | Id of the Azure Active Directory application to authenticate with. | |
| TenantId | Write | String | Id of the Azure Active Directory tenant used for authentication. | |
| ApplicationSecret | Write | PSCredential | Secret of the Azure Active Directory application to authenticate with. | |
| CertificateThumbprint | Write | String | Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication. | |
| CertificatePassword | Write | PSCredential | Username can be made up to anything but password will be used for CertificatePassword. | |
| CertificatePath | Write | String | Path to certificate used in service principal usually a PFX file. | |
| ManagedIdentity | Write | Boolean | Managed ID being used for authentication. | |
| AccessTokens | Write | StringArray[] | Access token used for authentication. |
Description¶
This resource configures federated identity credentials for Azure AD applications.
Permissions¶
Graph¶
To authenticate with the Graph API, this resource requires the following permissions:
Delegated permissions¶
- Read
-
Application.Read.All
-
Update
- Application.ReadWrite.All
Application permissions¶
- Read
-
Application.Read.All
-
Update
- Application.ReadWrite.OwnedBy, Application.ReadWrite.All
Examples¶
Example 1¶
This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
node localhost
{
AADApplicationFederatedIdentityCredential 'AADApplicationFederatedIdentityCredential'
{
ApplicationDisplayName = 'AppDisplayName'
Name = 'GitHubActionsMain'
Issuer = 'https://token.actions.githubusercontent.com'
Subject = 'repo:contoso/app:ref:refs/heads/main'
Audiences = @('api://AzureADTokenExchange')
Description = 'GitHub Actions main branch'
Ensure = 'Present'
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
}
}
}
Example 2¶
This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.
Configuration Example
{
param(
[Parameter()]
[System.String]
$ApplicationId,
[Parameter()]
[System.String]
$TenantId,
[Parameter()]
[System.String]
$CertificateThumbprint
)
Import-DscResource -ModuleName Microsoft365DSC
node localhost
{
AADApplicationFederatedIdentityCredential 'AADApplicationFederatedIdentityCredential'
{
ApplicationDisplayName = 'AppDisplayName'
Name = 'GitHubActionsMain'
Ensure = 'Absent'
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
}
}
}