diff --git a/samples/power-automate-flow-to-share-an-app/.gitignore b/samples/power-automate-flow-to-share-an-app/.gitignore
new file mode 100644
index 00000000..ba59257a
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/.gitignore
@@ -0,0 +1,8 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# msbuild output directories
+/bin
+/obj
+
+# MSBuild Binary and Structured Log
+*.binlog
diff --git a/samples/power-automate-flow-to-share-an-app/AppSharing.cdsproj b/samples/power-automate-flow-to-share-an-app/AppSharing.cdsproj
new file mode 100644
index 00000000..4dce520a
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/AppSharing.cdsproj
@@ -0,0 +1,54 @@
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\PowerApps
+
+
+
+
+
+
+ f38a1755-1c81-4ac7-9d1b-638f3a19df92
+ v4.6.2
+
+ net462
+ PackageReference
+ src
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
+
+
+
diff --git a/samples/power-automate-flow-to-share-an-app/README.md b/samples/power-automate-flow-to-share-an-app/README.md
new file mode 100644
index 00000000..2089d38a
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/README.md
@@ -0,0 +1,86 @@
+# Power Automate flow to automate sharing of a Canvas App
+
+## Summary
+
+This sample is a cloud flow that can be used to automate sharing of a canvas app. This flow initializes App ID variable & then uses a Switch condition to set the App ID variable based on the App Name present in a SharePoint List. It then leverages Apply to each to get users from SharePoint list, and uses Get User Entra ID action to get the user id based on email address. Finally, Edit App Role Assignment action is used to share the canvas app.
+
+
+
+
+
+## Applies to
+
+
+
+
+## Compatibility
+
+
+
+
+## Contributors
+
+* [Vipul Jain](https://github.com/vipulj03/)
+
+## Version history
+
+Version|Date|Comments
+-------|----|--------
+1.0|March 05, 2025|Initial release
+2.0|June 01, 2025|Updated Version with suggested changes
+
+## Prerequisites
+* This app uses Microsoft Entra ID connection.
+* This app uses **Edit App Role Assignment** action.
+* This app uses SharePoint as a data source and requires a SharePoint List with the following fields:
+ - List Name: App Sharing
+ - List Fields:
+ - Users (Person or Group) => allow multiple selection = yes
+ - AppNameNew (Choice) => E.g. - names of your app in the environment
+ - AppID (Single line of text) => enter the app ID of your app. This value will be read dynamically in the flow.
+
+## Minimal path to awesome
+
+### Using the solution zip
+
+* [Download](./solution/power-automate-flow-to-share-an-app.zip) the `.zip` from the `solution` folder
+* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
+* Open the app in edit mode and make sure the data source **Data source name** is connected correctly.
+
+### Using the source code
+
+You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps:
+
+* Clone the repository to a local drive
+* Pack the source files back into a solution `.zip` file:
+
+ ```bash
+ pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
+ ```
+
+ Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)
+* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
+
+## Features
+
+This sample illustrates the following concepts:
+* Automate the sharing of Canvas App, instead of manually sharing the app with multiple users
+* Use of Switch case in power automate flow
+* Use of Microsoft Entra ID action to get the user id
+* Use of Edit App Role Assignment action to assign the users to an app
+
+## Help
+
+We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
+
+If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=power-automate-flow-to-share-an-app&authors=@vipulj03&title=power-automate-flow-to-share-an-app%20-%20).
+
+For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=power-automate-flow-to-share-an-app&authors=@vipulj03&title=power-automate-flow-to-share-an-app%20-%20).
+
+Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=power-automate-flow-to-share-an-app&authors=@vipulj03&title=power-automate-flow-to-share-an-app%20-%20).
+
+## Disclaimer
+
+**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
+
+
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/assets/apply-to-each.png b/samples/power-automate-flow-to-share-an-app/assets/apply-to-each.png
new file mode 100644
index 00000000..7475e8e3
Binary files /dev/null and b/samples/power-automate-flow-to-share-an-app/assets/apply-to-each.png differ
diff --git a/samples/power-automate-flow-to-share-an-app/assets/flow-overview.png b/samples/power-automate-flow-to-share-an-app/assets/flow-overview.png
new file mode 100644
index 00000000..ecb8145a
Binary files /dev/null and b/samples/power-automate-flow-to-share-an-app/assets/flow-overview.png differ
diff --git a/samples/power-automate-flow-to-share-an-app/assets/sample.json b/samples/power-automate-flow-to-share-an-app/assets/sample.json
new file mode 100644
index 00000000..d8bf1ad2
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/assets/sample.json
@@ -0,0 +1,66 @@
+[
+ {
+ "name": "pnp-powerplatform-samples-power-automate-flow-to-share-an-app",
+ "source": "pnp",
+ "title": "Power Automate flow to automate sharing of a Canvas App",
+ "shortDescription": "This sample is a cloud flow that can be used to automate sharing of a canvas app.",
+ "url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/power-automate-flow-to-share-an-app",
+ "downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/power-automate-flow-to-share-an-app",
+ "longDescription": [
+ "This sample is a cloud flow that can be used to automate sharing of a canvas app."
+ ],
+ "creationDateTime": "2025-03-05",
+ "updateDateTime": "2025-06-01",
+ "products": [
+ "Power Automate",
+ "Power Platform"
+ ],
+ "tags": [
+ "Flow",
+ "Share"
+ ],
+ "categories": [
+ "CLOUD-FLOW"
+ ],
+ "metadata": [
+ {
+ "key": "POWERAPPS-EXPERIMENTAL",
+ "value": "No"
+ },
+ {
+ "key": "POWERAPPS-PREMIUM",
+ "value": "No"
+ },
+ {
+ "key": "POWERAPPS-ONPREM",
+ "value": "No"
+ },
+ {
+ "key": "POWERAPPS-CUSTOMCONNECTOR",
+ "value": "No"
+ }
+ ],
+ "thumbnails": [
+ {
+ "type": "image",
+ "order": 100,
+ "url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/power-automate-flow-to-share-an-app/assets/flow-overview.png",
+ "alt": "App preview"
+ }
+ ],
+ "authors": [
+ {
+ "gitHubAccount": "vipulj03",
+ "pictureUrl": "https://github.com/vipulj03.png",
+ "name": "Vipul Jain"
+ }
+ ],
+ "references": [
+ {
+ "name": "Microsoft Power Platform documentation",
+ "description": "Discover how to make the most of Microsoft Power Platform products with online training courses, docs, and videos covering product capabilities and how-to guides.",
+ "url": "https://learn.microsoft.com/power-platform/"
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/solution/power-automate-flow-to-share-an-app.zip b/samples/power-automate-flow-to-share-an-app/solution/power-automate-flow-to-share-an-app.zip
new file mode 100644
index 00000000..b768fbac
Binary files /dev/null and b/samples/power-automate-flow-to-share-an-app/solution/power-automate-flow-to-share-an-app.zip differ
diff --git a/samples/power-automate-flow-to-share-an-app/src/Other/Customizations.xml b/samples/power-automate-flow-to-share-an-app/src/Other/Customizations.xml
new file mode 100644
index 00000000..fc9b62f0
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/src/Other/Customizations.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Microsoft Entra ID AppSharing-69386
+ /providers/Microsoft.PowerApps/apis/shared_azuread
+ 1
+ 0
+ 0
+ 1
+
+
+ Power Apps for Makers AppSharing-3c6c8
+ /providers/Microsoft.PowerApps/apis/shared_powerappsforappmakers
+ 1
+ 0
+ 0
+ 1
+
+
+ SharePoint AppSharing-1d8cd
+ /providers/Microsoft.PowerApps/apis/shared_sharepointonline
+ 1
+ 0
+ 0
+ 1
+
+
+
+ 1033
+
+
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/src/Other/Solution.xml b/samples/power-automate-flow-to-share-an-app/src/Other/Solution.xml
new file mode 100644
index 00000000..9584f592
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/src/Other/Solution.xml
@@ -0,0 +1,87 @@
+
+
+
+ AppSharing
+
+
+
+
+ 1.0.0.0
+ 2
+
+ DefaultPublisherorgdd6add56
+
+
+
+
+
+
+
+
+ new
+ 10000
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/src/Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json b/samples/power-automate-flow-to-share-an-app/src/Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json
new file mode 100644
index 00000000..76506034
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/src/Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json
@@ -0,0 +1,196 @@
+{
+ "properties": {
+ "connectionReferences": {
+ "shared_azuread": {
+ "runtimeSource": "embedded",
+ "connection": {
+ "connectionReferenceLogicalName": "new_sharedazuread_69386"
+ },
+ "api": {
+ "name": "shared_azuread"
+ }
+ },
+ "shared_powerappsforappmakers": {
+ "runtimeSource": "embedded",
+ "connection": {
+ "connectionReferenceLogicalName": "new_sharedpowerappsforappmakers_3c6c8"
+ },
+ "api": {
+ "name": "shared_powerappsforappmakers"
+ }
+ },
+ "shared_sharepointonline": {
+ "runtimeSource": "embedded",
+ "connection": {
+ "connectionReferenceLogicalName": "new_sharedsharepointonline_1d8cd"
+ },
+ "api": {
+ "name": "shared_sharepointonline"
+ }
+ }
+ },
+ "definition": {
+ "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "$connections": {
+ "defaultValue": {},
+ "type": "Object"
+ },
+ "$authentication": {
+ "defaultValue": {},
+ "type": "SecureObject"
+ },
+ "SPList (new_SPList)": {
+ "defaultValue": "67d0693f-ab91-4ad3-831d-69d09e3bff66",
+ "type": "String",
+ "metadata": {
+ "schemaName": "new_SPList",
+ "description": "SharePoint List Name"
+ }
+ },
+ "POC1 - https://8fj2hx.sharepoint.com/sites/POC1 (new_SiteURL)": {
+ "defaultValue": "https://8fj2hx.sharepoint.com/sites/POC1",
+ "type": "String",
+ "metadata": {
+ "schemaName": "new_SiteURL"
+ }
+ }
+ },
+ "triggers": {
+ "When_an_item_is_created": {
+ "recurrence": {
+ "interval": 1,
+ "frequency": "Minute"
+ },
+ "splitOn": "@triggerOutputs()?['body/value']",
+ "metadata": {
+ "operationMetadataId": "0da0579c-d385-408e-a4a9-3c99c8270761"
+ },
+ "type": "OpenApiConnection",
+ "inputs": {
+ "host": {
+ "connectionName": "shared_sharepointonline",
+ "operationId": "GetOnNewItems",
+ "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
+ },
+ "parameters": {
+ "dataset": "@parameters('POC1 - https://8fj2hx.sharepoint.com/sites/POC1 (new_SiteURL)')",
+ "table": "@parameters('SPList (new_SPList)')"
+ },
+ "authentication": "@parameters('$authentication')"
+ }
+ }
+ },
+ "actions": {
+ "Initialize_variable_for_App_ID": {
+ "runAfter": {},
+ "metadata": {
+ "operationMetadataId": "4b6d1af6-053a-4a04-861a-ac1ff8403a2d"
+ },
+ "type": "InitializeVariable",
+ "inputs": {
+ "variables": [
+ {
+ "name": "varAppID",
+ "type": "string",
+ "value": "@{triggerOutputs()?['body/AppID']}"
+ }
+ ]
+ }
+ },
+ "Apply_to_each": {
+ "foreach": "@array(triggerOutputs()?['body/Users'])",
+ "actions": {
+ "Get_user": {
+ "runAfter": {},
+ "metadata": {
+ "operationMetadataId": "33f2e370-f81c-495c-878e-0ff9065b5b87"
+ },
+ "type": "OpenApiConnection",
+ "inputs": {
+ "host": {
+ "connectionName": "shared_azuread",
+ "operationId": "GetUser",
+ "apiId": "/providers/Microsoft.PowerApps/apis/shared_azuread"
+ },
+ "parameters": {
+ "id": "@items('Apply_to_each')?['Email']"
+ },
+ "authentication": "@parameters('$authentication')"
+ }
+ },
+ "Edit_App_Role_Assignment": {
+ "runAfter": {
+ "Get_user": [
+ "Succeeded"
+ ]
+ },
+ "metadata": {
+ "operationMetadataId": "d46de0b3-973f-4976-b46a-8aff7e54cacd"
+ },
+ "type": "OpenApiConnection",
+ "inputs": {
+ "host": {
+ "connectionName": "shared_powerappsforappmakers",
+ "operationId": "Edit-AppRoleAssignment",
+ "apiId": "/providers/Microsoft.PowerApps/apis/shared_powerappsforappmakers"
+ },
+ "parameters": {
+ "app": "@variables('varAppID')",
+ "api-version": "2016-11-01",
+ "$filter": "environment eq @{outputs('Compose_-_Environment_ID')}",
+ "Content-Type": "application/json",
+ "body/put": [
+ {
+ "properties/principal/email": "@items('Apply_to_each')",
+ "properties/principal/tenantId": "@outputs('Compose_-_Tenant_ID')",
+ "properties/principal/id": "@outputs('Get_user')?['body/id']",
+ "properties/roleName": "CanEdit"
+ }
+ ]
+ },
+ "authentication": "@parameters('$authentication')"
+ }
+ }
+ },
+ "runAfter": {
+ "Compose_-_Tenant_ID": [
+ "Succeeded"
+ ]
+ },
+ "metadata": {
+ "operationMetadataId": "19e2662f-f867-4740-a240-9e3710b51d87"
+ },
+ "type": "Foreach"
+ },
+ "Compose_-_Environment_ID": {
+ "runAfter": {
+ "Initialize_variable_for_App_ID": [
+ "Succeeded"
+ ]
+ },
+ "metadata": {
+ "operationMetadataId": "c0e83207-b62c-4754-98ff-5d873192c812"
+ },
+ "type": "Compose",
+ "inputs": "@workflow()['tags']['environmentName']"
+ },
+ "Compose_-_Tenant_ID": {
+ "runAfter": {
+ "Compose_-_Environment_ID": [
+ "Succeeded"
+ ]
+ },
+ "metadata": {
+ "operationMetadataId": "6eee50b7-b094-40ab-a092-8f9412a41112"
+ },
+ "type": "Compose",
+ "inputs": "@workflow()?['tags']?['tenantId']"
+ }
+ }
+ },
+ "templateName": ""
+ },
+ "schemaVersion": "1.0.0.0"
+}
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/src/Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json.data.xml b/samples/power-automate-flow-to-share-an-app/src/Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json.data.xml
new file mode 100644
index 00000000..6057b6df
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/src/Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json.data.xml
@@ -0,0 +1,27 @@
+
+
+ /Workflows/ShareApp-C78D51CF-E9F1-EF11-BE20-000D3AC7B386.json
+ 1
+ 0
+ 5
+ 0
+ 4
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 2
+ 1
+ 1
+ 1.0.0.0
+ 1
+ 0
+ 1
+ 0
+ none
+
+
+
+
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/src/environmentvariabledefinitions/new_SPList/environmentvariabledefinition.xml b/samples/power-automate-flow-to-share-an-app/src/environmentvariabledefinitions/new_SPList/environmentvariabledefinition.xml
new file mode 100644
index 00000000..ec2c9214
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/src/environmentvariabledefinitions/new_SPList/environmentvariabledefinition.xml
@@ -0,0 +1,18 @@
+
+ /providers/microsoft.powerapps/apis/shared_sharepointonline
+
+
+
+
+
+
+ 1.0.0.0
+ 1
+ 0
+ table
+
+ new_SiteURL
+
+ 0
+ 100000004
+
\ No newline at end of file
diff --git a/samples/power-automate-flow-to-share-an-app/src/environmentvariabledefinitions/new_SiteURL/environmentvariabledefinition.xml b/samples/power-automate-flow-to-share-an-app/src/environmentvariabledefinitions/new_SiteURL/environmentvariabledefinition.xml
new file mode 100644
index 00000000..30508f3d
--- /dev/null
+++ b/samples/power-automate-flow-to-share-an-app/src/environmentvariabledefinitions/new_SiteURL/environmentvariabledefinition.xml
@@ -0,0 +1,12 @@
+
+ /providers/microsoft.powerapps/apis/shared_sharepointonline
+
+
+
+ 1.0.0.0
+ 1
+ 0
+ dataset
+ 0
+ 100000004
+
\ No newline at end of file