DEV Community

Discussion on: Deploying Between Environments with Power Automate Instead of Pipelines

Collapse
 
vinit_nair_9effbb21ce9f67 profile image
Vinit Nair

@wyattdave I found an api which can be used to make components solution aware but I am unable to use it as it is giving error. Can you help me?

API: https://{tenantID}.environment.api.powerplatform.com/powerapps/apps/{appID}/makeSolutionAware?api-version=1

Error: The request failed with client error: 'The service principal with id 'XXXXXXXXXXXX' for application XXXXXXXXXXXXX does not have permission to access the path '10.0.1.24:20018/providers/Microsof...' in tenant {tenantID}.'. The correlation Id is '9fc36724-1ed9-4edd-8d3e-9f6094ba3584'.

Note: I have replaced IDs in error with placeholder so kindly ignore it.

Collapse
 
wyattdave profile image
david wyatt

Have you seen this dev.to/wyattdave/power-platform-mo..., might help

Collapse
 
vinit_nair_9effbb21ce9f67 profile image
Vinit Nair

@wyattdave yes this was starting point but wanted the same for canvas and model driven apps.

Thread Thread
 
wyattdave profile image
david wyatt

apologies, ive not used that api yet. But looking at the error its due to the spn you are using not having access to the app. Im guessing (probably wrong lol) that you want the pipeline spn to add the canvas app to solution then export it.

Because non solution flows are outside of dataverse you cant use security roles to access them (you have to be in the admin center using different auth). I think Power Apps are similar, only system admins can see all apps/share them, and only from the admin center (think it my be header location). So in theory you would need to share the app with the spn first, then move it to dataverse. In the admin center when you share apps you dont own you can see the api it uses, fingers crossed im wrong on the location control.