megel/powerapps-helper

Canvas Apps of environment not visible in the PowerApps Helper Extension

Closed this issue · 3 comments

Hi @megel ,

I am trying to access the source code of my Power Apps using VS Code using the PowerApps Helper extension. However, under the environment I'm working on I am not able to visualise my application. I am able to view the custom connectors but the flows and the canvas apps are not visible.

I was able to download the source code and open in VS Code using these steps: Tutorial Link. I want to use the Helper to push the source code back to PowerApps. I have been following your tutorial to do so https://never-stop-learning.de/powerapps-in-vscode/. However my Canvas Apps are not visible in my environment.

Kindly help me to access my apps using the Helper.

Thank you.

megel commented

@aagarwallaMS sorry for my delay, I was a little bit busy last month with family stuff.

Ok, to wrap up:

  • you have an PowerApp in your Dataverse environment
  • you do not see this PowerApp (CanvasApp) in PowerApps Helper tree view
  • you have downloaded and unpacked your canvas app with PASopa.exe
  • you have packed canvas app with PowerApps Helper to an msapp-file
  • you import your Power App manually and do not see the result in Power App Designer

Is this right?

Hi @megel,

I'm using your extension in VS Code and I have issues in displaying all the Canvas Apps I have create in 2 different environments. Some of the apps are displayed properly and I can download and unpack them, but others are not and I'm trying many times to refresh the list and no chance to pull the last published apps. Is it there a reason why not all the apps are identified in my tenant?

The Output look ok, without errors
GET https://api.powerapps.com/providers/Microsoft.PowerApps/environments/?api-version=2020-07-01 ... HTTP/1.1 200 OK
GET https://api.powerapps.com/providers/Microsoft.PowerApps/apps/?api-version=2020-07-01&$expand=unpublishedAppDefinition ... HTTP/1.1 200 OK

Thank you for your effort! It is a great idea to have an extension like this, but unfortunately it doesn't work all the time.

megel commented

@tudor-it it's hard to identify the problem.

Let's check if there any caching problems. Please restart VS Code completely and check again. If your apps are now visible - I need to look into refreshing / caching and will fix the issue.

If this doesn't work. Please try to use Postman or the RESTClient Extension and repeat this 2 APIs calls.

First of all, you need a bearer token. For this you can use this PowerShell command:

Get-JwtToken -Audience "https://management.azure.com/"

After authentication, copy your bearer token and use it for your web request as follows (REST CLient HTTP snippet):

# Variable containing my Bearer Token:
@bearer = eyJ...kw

### Get Environments
GET https://api.powerapps.com/providers/Microsoft.PowerApps/environments/?api-version=2020-07-01
Authorization: Bearer {{bearer}}

### Get PowerApps
GET https://api.powerapps.com/providers/Microsoft.PowerApps/apps/?api-version=2020-07-01&$expand=unpublishedAppDefinition
Authorization: Bearer {{bearer}}

Please confirm, that your PowerApp is part of the "Get PowerApps" call.