Forum Discussion
Create new connection api for Fabric Data Pipelines
Hi BramT ,
Your approach is close, but there are a few issues with the Fabric Data Pipelines connection setup. The main problem is that Fabric Data Pipelines connections don't use OAuth2 tokens the same way external APIs do.
Here's what needs to change:
For Fabric Data Pipelines, use service principal authentication instead:
$body = @{
connectivityType = 'ShareableCloud'
displayName = '9A Monitoring'
connectionDetails = @{
type = 'FabricDataPipelines'
creationMethod = 'Manual'
parameters = @(
@{
dataType = 'Text'
name = 'workspaceId'
value = 'your-workspace-id'
}
)
}
privacyLevel = 'Organizational'
credentialDetails = @{
singleSignOnType = 'None'
connectionEncryption = 'Encrypted'
skipTestConnection = $false
credentials = @{
credentialType = 'ServicePrincipal'
servicePrincipalId = 'your-service-principal-id'
servicePrincipalKey = 'your-service-principal-secret'
}
}
} | ConvertTo-Json -Depth 5Alternative - use the simpler approach:
Since you're calling one Fabric pipeline from another, you might not need a separate connection at all. Try using the Execute Pipeline activity directly with workspace authentication.
Debugging tips:
- Check what error you're getting from the API call
- Try skipTestConnection = $true to bypass connection validation
- Make sure your service principal has proper permissions on both workspaces
What specific error are you seeing when you run your current code? That'll help narrow down the exact issue.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.