Skip to main content

Add-MtMaesterAppFederatedCredential

SYNOPSIS​

Adds a federated credential to a Maester application for GitHub Actions authentication.

SYNTAX​

ById​

Add-MtMaesterAppFederatedCredential -Id <String> -GitHubOrganization <String> -GitHubRepository <String>
[-GitHubBranch <String>] [-Name <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

ByApplicationId​

Add-MtMaesterAppFederatedCredential -AppId <String> -GitHubOrganization <String> -GitHubRepository <String>
[-GitHubBranch <String>] [-Name <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION​

Adds a federated credential (workload identity) to a Maester application to enable authentication from GitHub Actions workflows without using client secrets. The credential allows the specified GitHub repository and branch to authenticate as the application.

EXAMPLES​

EXAMPLE 1​

Add-MtMaesterAppFederatedCredential -AppId "12345678-1234-1234-1234-123456789012" -GitHubOrganization "myorg" -GitHubRepository "myrepo"

Adds a federated credential for the main branch of myorg/myrepo to the specified Maester app.

EXAMPLE 2​

Add-MtMaesterAppFederatedCredential -Id "87654321-4321-4321-4321-210987654321" -GitHubOrganization "myorg" -GitHubRepository "myrepo" -Name "maester-develop"

Adds a federated credential for the develop branch with a custom name.

PARAMETERS​

-Id​

The Object ID of the Maester application to add the federated credential to.

Type: String
Parameter Sets: ById
Aliases: ObjectId

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AppId​

The Application (Client) ID of the Maester application to add the federated credential to.

Type: String
Parameter Sets: ByApplicationId
Aliases: ClientId

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GitHubOrganization​

Your GitHub organization name or GitHub username. E.g. jasonf

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GitHubRepository​

The GitHub repository in the format 'owner/repo' (e.g., 'myorg/myrepo').

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GitHubBranch​

The GitHub branch that can use this credential. Defaults to 'main'.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: Main
Accept pipeline input: False
Accept wildcard characters: False

-Name​

The name for the federated credential. Defaults to 'maester-devops'.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction​

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters​

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS​

OUTPUTS​

NOTES​

https://maester.dev/docs/commands/Add-MtMaesterAppFederatedCredential