Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
VipeenSekharan
Regular Visitor

Unable to automate 'Update all' option in a Git integrated Workspace via API from a Pipeline

I am a DevOps Engineer who just started working on Fabric.

I have a Fabric Worspace which is Git integrated to an Azure DevOps repository. My aim is, whenever I make changes to the repo and run its pipeline, it should sync with the Fabric workspace - basically click on the 'Update all' button under 'Source Control' and then copy contents from one environment to another.

Sample pic attached.

VipeenSekharan_0-1761274746818.png

I have no problem with copying the content, its the triggering 'Update all' option I am failing at. 

My pipeline uses a Service Principal (tried first with Workload Identity Federation, then moved to use Client Secret to make it easier for authentication).

Checklist:

  • Git Integration is configured in the workspace

  • Service principal is used as the main account for Git Integration in Fabric Workspace

  • Service Principal has high-level app permissions in Azure Entra ID

  • Service principal has Contributor permissions in DevOps Repository

  • Service principal has Admin privileges on the workspace

Pipeline log:

Pipeline is running as user: ***
Account Type: ClientAssertion
Tenant: ***
Current Azure Context: ***
Acquiring access token for Fabric API...
Calling GET workspaces REST API to confirm the existence of the workspace.
Base URL is
https://api.fabric.microsoft.com/v1
GET workspaces URL is
https://api.fabric.microsoft.com/v1/workspaces
Retrieved workspaces
*** LISTS ALL WORKSPACES ***

Workspace name is

id : kht8fd4c-5c9h-4359-r123-2015ZA70bvd6
displayName : My - Test Workspace
description : Delete after testing
type : Workspace
capacityId : 492a17fc-f1f1-4b15-a2a8-663d1202142b

Workspace is not null, proceeding with Git update.
Git status URL is
https://api.fabric.microsoft.com/v1/workspaces/kht8fd4c-5c9h-4359-r123-2015ZA70bvd6/git/status
Calling GET Status REST API to construct the request body for UpdateFromGit REST API.
Git status call failed. Full error details:
Exception: Response status code does not indicate success: 400 (Bad Request).
Status Code: BadRequest
Could not read response body: Exception calling "ReadAsStringAsync" with "0" argument(s): "Cannot access a disposed object.
Object name: 'System.Net.Http.HttpConnectionResponseContent'."
Error Details:
{
"requestId": "ff579c64-b4c2-4acf-ab04-66ede56fb35b",
"errorCode": "GitCredentialsNotConfigured",
"message": "The user\u0027s \u0027Git credentials are not configured."
}
Failed to update the workspace 'My - Test Workspace' from Git:
{
"requestId": "ff579c64-b4c2-4acf-ab04-66ede56fb35b",
"errorCode": "GitCredentialsNotConfigured",
"message": "The user\u0027s \u0027Git credentials are not configured."
}

 

The error points at Git credentials not being configured. I have verified that its not the case - screenshot attached.

Screenshot 2025-10-24 141452.png

Part of Pipeline which is causing the failure:

try {
$gitStatusResponse = Invoke-RestMethod -Headers $global:fabricHeaders -Uri $gitStatusUrl -Method GET
Write-Host "Git status call succeeded. Response:"
$gitStatusResponse | ConvertTo-Json -Depth 3
}
catch {
Write-Host "Git status call failed. Full error details:"
Write-Host "Exception: $($_.Exception.Message)"
...
...

 

Base URL: "https://api.fabric.microsoft.com/v1"

Reference: Git - Update From Git - REST API (Core) | Microsoft Learn

 

Any guidance or help is much appreciated.

1 ACCEPTED SOLUTION

Happy to see that you made a progress.

The error you are getting is a new one not related to the original one. 

You might have items with dependencies in the workspace that cant be resolve all workspace dependencies maybe lake of permissions for the spn. suggest to narrow down the problem and start with simple workspace which contain one item, like data pipeline and see if the entire process working for you.

Then try to add your items and see which one is failing the process.

If this is not helping, you can open a support case and providing the request id and the team will be happy to assist.

View solution in original post

9 REPLIES 9
v-nmadadi-msft
Community Support
Community Support

Hi @VipeenSekharan 
May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


Thank you

KevinChant
Super User
Super User

Hi, I suggest testing your credentials with the API outside of Fabric using an app like Postman and then take your investigation from there.

v-nmadadi-msft
Community Support
Community Support

Hi @VipeenSekharan 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


Thank you.

yaronprigal
Microsoft Employee
Microsoft Employee

Hi @VipeenSekharan ,

1) you need to make sure that the service principal has access to the connection that you created - the printscreen you are showing is based on the user which login to the fabric ui, you can list the connection list by using tools like postman, and call this api when passing the spn token in the header - https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/list-connections?tabs=HTTP

2) if the connection that you created is not returned in the list, you can share the connection via the Fabric UI with the SPN 

OR

you can call create connection api,  https://learn.microsoft.com/en-us/rest/api/fabric/core/connections/create-connection?tabs=HTTP

 

3) Once you have the connection id that your spn has access to, you need to call this api - https://learn.microsoft.com/en-us/rest/api/fabric/core/git/update-my-git-credentials?tabs=HTTP

passing the connection id 

 

after you complete the steps, the spn should work for you when executing the update-from-git api from your pipeline.

I have also example here, which was demonstrate in the last FabCon EU - https://github.com/yaronpri/fabcon2025-cicd-demo/blob/main/Azure-devops/azure-pipelines.yml

 

you also have example of the api of create / list connection in the article shared, look at the end of the doc - https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-automation?tabs=user%2CADO

 

Hope it will help.

 

Hi @yaronprigal, thanks for your suggestion.
1. yes, the printscreen is based on the user (in this case, myself).

2. I couldn't list the particular connection or anyother connection


Based on your suggestion, I was able to create a connection from a pipeline task using Service Principal and list it now. There is definitely a progress until I try to update the workspace. 

Looking for workspace: 'Vipeen - Test Workspace'
Found workspace: 'Vipeen - Test Workspace' (ID: gk5h4h5-5h6h-8635-b849-2015bc53aaa7)
Checking current Git connection status...
Workspace is already connected to Git:
Repository: ##REPO NAME
Branch: ## BRANCH NAME
Directory: /
Getting Git status for already connected workspace...
🔍 Attempting to get Git status...
Git Status URL: https://api.fabric.microsoft.com/v1/workspaces/gk5h4h5-5h6h-8635-b849-2015bc53aaa7/git/status
Using headers: Content-Type = application/json, Authorization = Bearer [REDACTED]
Git status retrieved successfully
Response: {
"workspaceHead": "75e348582a6f5c0ba5019a54b9f0eef69f316d32",
"remoteCommitHash": "g2364286e0dc73f341b520088e66d32dda35243",
"changes": [
{
"remoteChange": "Added",
"workspaceChange": null,
"conflictType": "None",
"itemMetadata": {
"itemIdentifier": "@{logicalId=339d678c-5629-a0fe-4aa2-02f635c489ce}",
"itemType": "SynapseNotebook",
"displayName": "Test Loader"
}
}
]
}
🔄 Updating workspace 'Vipeen - Test Workspace' from Git...
Update from git body value is {
"workspaceHead": "75e348582a6f5c0ba5019a54b9f0eef69f316d32",
"remoteCommitHash": "g2364286e0dc73f341b520088e66d32dda35243"
}
Failed to connect and update workspace 'Vipeen - Test Workspace' from Git. Error: {"requestId":"4e2d256a-0ed9-48be-8546-1a563092ad3b","errorCode":"DiscoverDependenciesFailed","message":"Dependency discovery failed for one or more items."}

🔧 DEPENDENCY DISCOVERY FAILED

  

Happy to see that you made a progress.

The error you are getting is a new one not related to the original one. 

You might have items with dependencies in the workspace that cant be resolve all workspace dependencies maybe lake of permissions for the spn. suggest to narrow down the problem and start with simple workspace which contain one item, like data pipeline and see if the entire process working for you.

Then try to add your items and see which one is failing the process.

If this is not helping, you can open a support case and providing the request id and the team will be happy to assist.

v-nmadadi-msft
Community Support
Community Support

Hi @VipeenSekharan  ,
Thanks for reaching out to the Microsoft fabric community forum.

Service Principal is only supported for the update from git operation only if the items involved in the operation support service principals.

Please check if the items you are using in the workspace are supported in this article:
Item management - Microsoft Fabric REST APIs | Microsoft Learn

vnmadadimsft_0-1761625478571.png

 





I hope this information helps. Please do let us know if you have any further queries.
Thank you

ibarrau
Super User
Super User

Hi. I think we'll need to check more code, it's difficult to help in a bad request if we can't actually see how the request is built. Just in case, I can see that your are not login DevOps with Entra ID. Make sure you have read this doc: https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-integration-with-service-principal...

Then you can check code here: https://learn.microsoft.com/en-us/fabric/cicd/git-integration/git-automation

I hope that helps,


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

Thanks for your suggestion @ibarrau. I went through the get integration article and then the code. Almost looks the same from my end.

Still, I removed Workload Identity Federation as a form of authentication and started using client secret. All my errors point to "The user's Git credentials are not configured".

I added some debugging to list all available Connections in Fabric to see if it is capable of identifying mine, but it doesn't recognise any of the connections unfortunately. I am beginning to wonder if I have overlooked anything in the Git configuration part.

Latest log:

Setting up Fabric authentication headers using service principal...
Authenticating with Service Principal: ****
Successfully authenticated with Azure
Using Azure context: ****
Account Type: ServicePrincipal
Tenant: ****
Successfully acquired Fabric API token
Looking for workspace: 'Vipeen - Test Workspace'
Found workspace: 'Vipeen - Test Workspace' (ID: ****)
Checking current Git connection status...
Workspace is already connected to Git:
Repository: vipeen.fabric
Branch: Vipeen-develop
Directory: /
Getting Git status for already connected workspace...
🔍 Attempting to get Git status...
Git Status URL: https://api.fabric.microsoft.com/v1/workspaces/****/git/status
Using headers: Content-Type = application/json, Authorization = Bearer [REDACTED]
Git status call failed
Error Type: System.Net.WebException
HTTP Status Code: BadRequest
Error Details Raw:
Exception Message: The remote server returned an error: (400) Bad Request.
Processing error details to check for GitCredentialsNotConfigured...
⚠️ Different error detected, but will still try to list connections for debugging
Error code found:

🔍 ===== DEBUGGING - LISTING CONNECTIONS ANYWAY =====
Connections URL: https://api.fabric.microsoft.com/v1/connections
Total connections found: 0
No connections found.
Failed to connect and update workspace 'Vipeen - Test Workspace' from Git. Error: {"requestId":"67e0a820-b4a2-4aac-9e64-248907794bbf","errorCode":"GitCredentialsNotConfigured","message":"The user's 'Git credentials are not configured."}
ℹ️ This is expected if Git credentials need to be configured - pipeline will continue to show available options

Screenshots of the service principal under Connections and Gateways in Fabric

VipeenSekharan_1-1761539788841.png

 

VipeenSekharan_0-1761539609375.png

Link to particular task to connect and updated the workspace. It contains excessive debugging which will be easier to link with the pipeline logs - Fabric/Connect and Update Fabric Workspace from Git.yaml at main · sdvipeen/Fabric · GitHub

Thanks.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.