I have a Power platform solution consisting of a scheduled ‘Cloud flow’ and ‘Power automate desktop flow’, the cloud flow does following activities,
- Fetches files from SharePoint (SharePoint Connection)
- Invokes the Desktop flow (Desktop Connection)
To prepare for Azure DevOps deployment i need to share the above connections with DevOps Service Principal. I am able to share the SPO connection with Azure DevOps Service Principal, however, it is not possible to share Desktop Connection, because of this the solution deployment is failing. As per my understanding without sharing the connections it is not possible to automate deployments (i am using connection references in settings file).
How to overcome the above challenges? Why there is restriction on sharing Desktop connections?
Additional information: Below is the task used to import the solution,
- task: PowerPlatformImportSolution@2
displayName: 'importSolution'
inputs:
authenticationType: 'PowerPlatformSPN'
PowerPlatformSPN: ${{ parameters.devOpsSPN }}
SolutionInputFile: '$(Pipeline.Workspace)/_managed.zip'
UseDeploymentSettingsFile: true
DeploymentSettingsFile: '$(Pipeline.Workspace)/settings.json'
AsyncOperation: true
MaxAsyncWaitTime: '60'
OverwriteUnmanagedCustomizations: true
Below exception is thrown during the execution,
Request failed with: Forbidden and error:
{“error”:{“code”:”ConnectionAuthorizationFailed”,”message”:”The caller
with object id ‘3c4b71874′ does not have the minimum
required permission to perform the requested operation on connection
‘ec6e6506238′ under API ‘shared_uiflow’.”}} and request
url
https://api.powerapps.com/providers/Microsoft.PowerApps/scopes/service/apis/shared_uiflow/connections/ec66238?api-version=2018-10-01&$expand=permissions($filter=maxAssignedTo(‘3c41874′)&$filter=environment
eq ‘7e**f50′.
The settings file references the SPO and Desktop connection as below,
"ConnectionReferences": [
{
"LogicalName": "contoso_Desktop_Flow_ConnRef",
"ConnectionId": "9fec************215a9",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_uiflow"
},
{
"LogicalName": "contoso_Microsoft_Dataverse_ConnRef",
"ConnectionId": "shared-commondataser-c46c-000-000-000-09f",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps"
},
{
"LogicalName": "contoso_SharePoint_ConnRef",
"ConnectionId": "31ee90000000000000000000553a71d",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
},
{
"LogicalName": "new_shareduiflow_45580",
"ConnectionId": "9fecdd3c-0000-000-000-4b2717a215a9",
"ConnectorId": "/providers/Microsoft.PowerApps/apis/shared_uiflow"
}
]
Note: We have a reusable pipeline which is working successfully in scenarios where there is no ‘desktop connections’.
4