In this example, I'm using an Azure DevOps - Source Control connection configured with Service Principal authentication as shown on the image below
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."}"
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.
1 Comment
- frithjof_v
Community Champion
I had the same issue when trying to connect a workspace to GitHub using the API. It turns out I had to create the workspace folder in GitHub first (in my case: workspace/engineering, workspace/store, workspace/presentation) before attempting to connect the workspace to GitHub. When we connect a workspace to GitHub in the workspace settings user interface, the GitHub directory gets created if it doesn't already exist. But, when using the API to connect a workspace to GitHub, we need to create the folder in GitHub first before we can make the connection.
Recent ideas
Paginated report - Subscription every 2nd Week option
Currently I have a lot of reports that would ideally run every 2nd week (payroll in New Zealand generally works on a fortnightly/2-weekly cycle). However the closest I can get is to either run sched...PeteCresswell4 hours agoNew MemberNew8Views0likes0CommentsIncrease or Make Configurable the Power BI Browser Tab Limit (Currently 20 Items)
Power BI users frequently work across multiple reports, dashboards, semantic models, notebooks, and Fabric artifacts simultaneously. The current browser limitation of 20 open Power BI/Fabric items re...sharadmahajan7 hours agoRegular VisitorNew239Views16likes1CommentEnable Fine-Grained, Least-Privilege Control Over Fabric Artifact Creation
Please introduce more granular permission controls that allow admins to determine which user groups can create specific Fabric artifacts. The current all-or-nothing model—where users can either creat...krish00713 hours agoNew MemberNew160Views2likes1CommentMS Fabric User Permission Segmentation by Artifacts
Currently, when we grant users permission to create Fabric artifacts, they can create anything available in the workspaces they have access to. This unrestricted access can lead to an unstructured en...Anonymous13 hours agoNot applicableNew329Views8likes2Comments