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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Fix misleading error message GitProviderResourceNotFound

In this example, I'm using an Azure DevOps - Source Control connection configured with Service Principal authentication as shown on the image below 

 

svenchio_0-1767097086731.png

 

Using this connection, I'm invoking a interface Git - Connect - REST API (Core) | Microsoft Learn , following the example provided in Connect a workspace to Azure DevOps using configured connection example  and implemented using PowerShell script, in the image below you can see how the call is correct, but I'm getting an error "{"requestId":"xxxxxxxx-xxxx-xxxx-xxxxxxxxxx","errorCode":"GitProviderResourceNotFound","message":"The requested operation can't be completed because the Git provider resource could not be found using the provided Git connection details."}

 

svenchio_1-1767097086739.png

 

 

After a LONG INVESTIGATION following what the error suggested the problem was (e.g. ID of the connection incorrect, lack of permissions, etc)  and ruling-out many alternatives, I concluded that it wasn't none of this but the issue was that, on the target branch reference in the example shown "workspace/ws_test-auto-deploy_dev" did not contain "directoryName": "/fabric" 

 

This is why the return error message GitProviderResourceNotFound is very misleading and should be more granular, it would have same me a lot of time something different like "BranchMissingDirectory" instead. 

Status: New