Skip to main content
Version: 2.0.1 (preview)

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