Forum Discussion
Automated Deployment w/ Service Principal in DevOps
Hi 0_0,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Harshitha.
Hey Anonymous ,
I'm still unable to connect to git, I have a feeling it may be with the portion or the delegated scopes for the SPN itself.
$connectToGitBody = @{}
if ($gitProviderDetails.gitProviderType -eq "AzureDevOps") {
Write-Host "Getting connection by name: $connectionName"
$connection = GetConnectionByName $connectionName
Write-Host "Connection lookup result: $($connection | ConvertTo-Json -Depth 3)"
if (-not $connection) {
Write-Host "A connection with the requested name was not found." -ForegroundColor Red
return
}
$connectToGitBodyObject = @{
gitProviderDetails = $gitProviderDetails
myGitCredentials = @{
source = "ConfiguredConnection"
connectionId = $connection.id
}
}
if (-not $workspace.Id) { Write-Host "Workspace ID is null"; return }
if (-not $connection.id) { Write-Host "Connection ID is null"; return }
$connectToGitBody = $connectToGitBodyObject | ConvertTo-Json -Depth 3
Write-Host "Connect to Git body: $connectToGitBody"
try {
Invoke-RestMethod -Headers $global:fabricHeaders -Uri $connectUrl -Method POST -Body $connectToGitBody
Write-Host "Workspace '$workspaceName' connected to Git." -ForegroundColor Green
} catch {
Write-Host "Failed to connect workspace to Git. Detailed error: $($_ | ConvertTo-Json -Depth 3)" -ForegroundColor Red
return
}
}
Thanks!
- Anonymous1 year agoNot applicable
Hi 0_0 ,
We regret the inconvenience caused. Please consider raising a Microsoft support ticket for further investigation. You can explain all the troubleshooting steps you have taken to help them better understand the issue.
You can create a Microsoft support ticket with the help of the link below:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket - Anonymous1 year agoNot applicable
Hi 0_0,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.
Regards,
Harshitha.