Skip to content

Power Automate sample to automate sharing of Canvas App #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vipulj03
Copy link
Contributor

@vipulj03 vipulj03 commented Mar 4, 2025

By submitting this pull request, you agree to the contribution guidelines

If you aren't familiar with how to contribute to open-source repositories using GitHub, or if you find the instructions on this page confusing, sign up for one of our Sharing is Caring events. It's completely free, and we'll guide you through the process.

To submit a pull request with multiple authors, make sure that at least one commit is a co-authored commit by adding a Co-authored-by: trailer to the commit's message. E.g.: Co-authored-by: name <name@example.com>

Put an x in all the items that apply ([x], without spaces), make notes next to any that haven't been addressed.

  • Bug fix?
  • New sample?
  • Related issues: fixes #X, partially #Y, mentioned in #Z
  • Needs API permissions?
  • Has other prerequisites? (E.g. requires a list, document library, etc.)

What's in this Pull Request?

This sample is a Power Automate cloud flow that can be used to automate sharing of a canvas app.

Checklist

This checklist is mostly useful as a reminder of small things that can easily be forgotten – it is meant as a helpful tool rather than hoops to jump through.

Put an x in all the items that apply ([x], no spaces), make notes next to any that haven't been addressed.

  • My pull request affects only ONE sample.
  • I have updated the README file.
  • My README has at least one static high-resolution screenshot (i.e. not a GIF)
  • My README contains complete setup instructions, including pre-requisites and permissions required

@Katerina-Chernevskaya
Copy link
Contributor

Hi @vipulj03 ,

Thank you for your sample! I was try to import the solution, however, I got the error when tried to add value to environment variables:
image

When I skip this step and proceed with import, I got the following message:
image

Solution "AppSharing" imported successfully with warnings: Flow client error returned with status code "BadRequest" and details "{"error":{"code":"InvalidRequestContent","message":"The request content was invalid and could not be deserialized: 'Could not find member 'isLicenseEntitledByRetrieved' on object of type 'SolutionFlowDefinitionRequestProperties'. Path 'activatedEntity.isLicenseEntitledByRetrieved', line 1, position 6043.'."}}".

Could you please check the source code and test solution pack on you side (try to install in a new environment), and resolve the issue I mentioned above?

Thank you!

Regards,
Katerina Ch.

@Katerina-Chernevskaya Katerina-Chernevskaya added the Needs Attention Something needs to be fixed with the PR before merging label Mar 10, 2025
@Katerina-Chernevskaya
Copy link
Contributor

Hi @vipulj03 ,

I've tested on another tenant and was able to import the solution. Seems the issue above occurs in some tenants.

When I tried to run the flow I got the error:
image
The execution of template action 'Switch' failed: The result of the evaluation of 'scope' action expression '@triggerOutputs()?['body/App_x0020_Name/Value']' is not valid. It is of type 'Null' but is expected to be a value of type 'String, Integer'.

It seems that the field reference should be without space (_x0020_). I tested and for me works this:
image

Could you please check this on your side?

Also I've noticed that you hardcoded app's id in the flow. That makes impossible to take the app id from another tenant. Could you please replace the hardcoded values with dynamically extracted app id?
image

Thank you! If any questions - please ping me.

BR,
Kate Ch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Attention Something needs to be fixed with the PR before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants