FabricTools v0.33.0 Public Preview

Update-FabricGitCredential

Updates the Git credentials configuration of the current user for a Fabric workspace.

Syntax

Parameter set: ConfiguredConnection (Default)
Update-FabricGitCredential -WorkspaceId <guid> -ConnectionId <guid> [-WhatIf] [-Confirm]
 [<CommonParameters>]
Parameter set: Automatic
Update-FabricGitCredential -WorkspaceId <guid> -Automatic [-WhatIf] [-Confirm] [<CommonParameters>]
Parameter set: None
Update-FabricGitCredential -WorkspaceId <guid> -None [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Sets how the calling user (or service principal) authenticates to Git in the specified workspace. Exactly one of the following is used: -Automatic source 'Automatic' (Azure DevOps with the caller's identity) -ConnectionId <id> source 'ConfiguredConnection' using a configured Fabric connection -None source 'None' (removes the credentials configuration)

Examples

Example 1

Update-FabricGitCredential -WorkspaceId '11111111-1111-1111-1111-111111111111' -ConnectionId '22222222-2222-2222-2222-222222222222'

Uses the configured connection for Git operations in the workspace.

Example 2

Update-FabricGitCredential -WorkspaceId '11111111-1111-1111-1111-111111111111' -Automatic

Uses automatic credentials for Git operations in the workspace.

Parameters

NameTypeReq.Pos.PipelineDescription
-Automatic switch ✓Required Named –

Use automatic credentials.

Default: False
-ConnectionId guid ✓Required Named –

The ID of a configured Fabric connection holding the Git credentials.

-None switch ✓Required Named –

Remove the Git credentials configuration.

Default: False
-WorkspaceIdalias: Id guid ✓Required Named By name

The ID of the workspace. Accepts pipeline input by property name (alias Id).

-Confirmalias: cf switch Named –

Prompts you for confirmation before running the cmdlet.

-WhatIfalias: wi switch Named –

Runs the command in a mode that only reports what would happen without performing the actions.

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Inputs

System.Guid

{{ Fill in the Description }}

Outputs

System.Management.Automation.PSCustomObject

The updated credentials configuration with WorkspaceId added.

{{ Fill in the Description }}

System.Management.Automation.PSCustomObject

{{ Fill in the Description }}

Notes

https://learn.microsoft.com/en-us/rest/api/fabric/core/git/update-my-git-credentials

Requires the workspace Contributor role or higher.

Author: Kamil Nowinski