Git - Update My Git Credentials
Updates the user's Git credentials configuration details.
Each user in the workspace has their own configured Git credentials. You can use Get My Git Credentials to get the Git credentials configuration.
Permissions
The caller must have a contributor or higher workspace role.
For configured connection Git credentials, the caller must have permission for the connection.
Required Delegated Scopes
Workspace.ReadWrite.All
Microsoft Entra supported identities
This API supports the Microsoft identities listed in this section.
Identity | Support |
---|---|
User | Yes |
Service principal and Managed identities | No |
Interface
PATCH https://api.fabric.microsoft.com/v1/workspaces/{workspaceId}/git/myGitCredentials
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
workspace
|
path | True |
string uuid |
The workspace ID. |
Request Body
The request body can be one of the following:
Name | Description |
---|---|
Update |
Contains the request data to update the Git credentials to automatic. |
Update |
Contains the request data to update the Git credentials to configured connection. |
Update |
Contains the request data to update the Git credentials to none. |
UpdateGitCredentialsToAutomaticRequest
Contains the request data to update the Git credentials to automatic.
Name | Required | Type | Description |
---|---|---|---|
source | True |
string:
Automatic |
The Git credentials source. |
UpdateGitCredentialsToConfiguredConnectionRequest
Contains the request data to update the Git credentials to configured connection.
Name | Required | Type | Description |
---|---|---|---|
connectionId | True |
string |
The object ID of the connection. |
source | True |
string:
Configured |
The Git credentials source. |
UpdateGitCredentialsToNoneRequest
Contains the request data to update the Git credentials to none.
Name | Required | Type | Description |
---|---|---|---|
source | True |
string:
None |
The Git credentials source. |
Responses
Name | Type | Description |
---|---|---|
200 OK | GitCredentialsConfigurationResponse: |
Request completed successfully. |
Other Status Codes |
Common error codes:
|
Examples
Update user's Git credentials to Configured |
Update user's Git credentials to None example |
Update user's Git credentials to ConfiguredConnection example
Sample request
PATCH https://api.fabric.microsoft.com/v1/workspaces/1565e6a3-c020-4c0c-dda7-92bafe99eec5/git/myGitCredentials
{
"source": "ConfiguredConnection",
"connectionId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301"
}
Sample response
{
"source": "ConfiguredConnection",
"connectionId": "3f2504e0-4f89-11d3-9a0c-0305e82c3301"
}
Update user's Git credentials to None example
Sample request
PATCH https://api.fabric.microsoft.com/v1/workspaces/1565e6a3-c020-4c0c-dda7-92bafe99eec5/git/myGitCredentials
{
"source": "None"
}
Sample response
{
"source": "None"
}
Definitions
Name | Description |
---|---|
Automatic |
Automatic Git credentials. |
Configured |
Configured connection Git credentials. |
Error |
The error related resource details object. |
Error |
The error response. |
Error |
The error response details. |
Git |
The Git credentials source. Additional Git credentials sources may be added over time. |
None |
Not configured Git credentials. |
Update |
Contains the request data to update the Git credentials to automatic. |
Update |
Contains the request data to update the Git credentials to configured connection. |
Update |
Contains the request data to update the Git credentials to none. |
AutomaticGitCredentialsResponse
Automatic Git credentials.
Name | Type | Description |
---|---|---|
source |
string:
Automatic |
The Git credentials source. |
ConfiguredConnectionGitCredentialsResponse
Configured connection Git credentials.
Name | Type | Description |
---|---|---|
connectionId |
string |
The object ID of the connection. |
source |
string:
Configured |
The Git credentials source. |
ErrorRelatedResource
The error related resource details object.
Name | Type | Description |
---|---|---|
resourceId |
string |
The resource ID that's involved in the error. |
resourceType |
string |
The type of the resource that's involved in the error. |
ErrorResponse
The error response.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
moreDetails |
List of additional error details. |
|
relatedResource |
The error related resource details. |
|
requestId |
string |
ID of the request associated with the error. |
ErrorResponseDetails
The error response details.
Name | Type | Description |
---|---|---|
errorCode |
string |
A specific identifier that provides information about an error condition, allowing for standardized communication between our service and its users. |
message |
string |
A human readable representation of the error. |
relatedResource |
The error related resource details. |
GitCredentialsSource
The Git credentials source. Additional Git credentials sources may be added over time.
Name | Type | Description |
---|---|---|
Automatic |
string |
The Git credentials are automatically obtained by the system, using default credentials if available. |
ConfiguredConnection |
string |
The Git credentials are obtained through a configured connection. |
None |
string |
The Git credentials are not configured. |
NoneGitCredentialsResponse
Not configured Git credentials.
Name | Type | Description |
---|---|---|
source |
string:
None |
The Git credentials source. |
UpdateGitCredentialsToAutomaticRequest
Contains the request data to update the Git credentials to automatic.
Name | Type | Description |
---|---|---|
source |
string:
Automatic |
The Git credentials source. |
UpdateGitCredentialsToConfiguredConnectionRequest
Contains the request data to update the Git credentials to configured connection.
Name | Type | Description |
---|---|---|
connectionId |
string |
The object ID of the connection. |
source |
string:
Configured |
The Git credentials source. |
UpdateGitCredentialsToNoneRequest
Contains the request data to update the Git credentials to none.
Name | Type | Description |
---|---|---|
source |
string:
None |
The Git credentials source. |