The Wrap feature in Power Apps allows you to transform your Canvas app into a native mobile app. This process is especially beneficial for organizations that want to distribute apps internally or via app stores while maintaining the native app-like experience.
Note: Before you begin the wrapping process, ensure that you have the installed Java /JDK, openssl, Android Studio
Please find below steps to Wrap the Canvas App:
1. Generating keys
Use keytool.exe to generate a certificate for signing the Android app.
Run Command Prompt as Administrator and then Navigate to keytool directory:
cd “C:\Program Files\Java\jdk-23\bin”
To generate a key, run the following command:
keytool -genkey -alias SIGNATURE_ALIAS -keyalg RSA -keystore PATH_TO_KEYSTORE -keysize 2048 -validity 10000
where,
SIGNATURE_ALIAS: Specifies a unique name for the key in the keystore.
PATH_TO_KEYSTORE: Path to the keystore file where the generated key pair will be stored.
2. Generate Signature Hash
Once the key is generated, use the exportcert command to create the signature hash.
keytool -exportcert -alias SIGNATURE_ALIAS -keystore PATH_TO_KEYSTORE | openssl sha1 -binary | openssl base64
3. Enable Wrap feature for Power Apps Solution:
1. Sign in to your Power Platform Admin Centre. > Click on Now select Dynamics 365 apps.
2. From the listed app, search for ‘wrap’ and select ‘Wrap for Power Apps’. Now, click on (…) More Application Actions and click on Install.
3. After clicking Install, a window will appear asking you to choose an environment. Select the environment where you want to install the wrap, check the box to agree to the terms of service, and then click Install.
4. Register the Application in the Microsoft Azure Portal
This step ensures authorization and authentication for the app to access Power Apps Services.1. Log into your Microsoft Entra Admin Center and Click on Applications. Now navigate to App registrations and click on ‘New registration’.
2. Give a name to register the application and choose a Multitenant account type.
Note: Currently, “Wrap” only supports “Multitenant account” types.
5. Configure the API Permissions and Authentication
Configure the required API Permissions to your app. These permissions ensure secure and controlled access to APIs and services i.e. what resources and actions your app is authorized to access or perform.
Below is the list of required API Permissions that need to be added.
– Dynamics CRM
APIs my organization uses
– Azure API Connections
– PowerApps Service
To add permissions:
Now navigate to Manage. Under Manage > click on API permissions > click Add permission and add the above-listed API permissions to your app. After adding permissions, the admin must click on ‘Grant admin consent for Tech’.
6. Configure Platform Settings
Under the Manage section click on Authentication > click on ‘Add a platform’ > Choose Android as the platform since we are creating an Android app.
Provide the app Package Name and previously generated Signature Hash in Step 2.
7. Create an App Center location.
App Center is the place where the wrap for Power Apps builds will be published i.e. where our .apk file would be generated.
Sign into App Center > Click on Add New and then select Add New Organization to create a new organization. If you already have an organization, you don’t need to create a new one.
Choose Apps > click on Add new app > Enter App Name and select one of the release types.
For android, choose OS ‘Android ’ and ‘React Native’ as platforms. Click on ‘Add new app’ to complete.
8. PowerShell Commands for Power Apps Administration.
To enable administration and allow third-party apps below are essential PowerShell commands to manage and configure Power Apps environments.
Open PowerShell as Administrator
Get-ExecutionPolicy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
Add-PowerAppsAccount
Add-AdminAllowedThirdPartyApps -ApplicationId “{ApplicationID}”
To find ApplicationID > refer to Step 4 where we have registered for the app. From the left Side Panel >Click on Overview > Copy the Application (client) ID from the Overview tab.
9. Turn the canvas app into a native mobile app using the Wizard.
Sign in to PowerApps.
Add canvas app to a solution :
Your Canvas must be included in the solution for the wrap to work. If it’s not, you need to add it to a new or existing solution.
Now, go to the solution where your canvas app is located. Select the app you want to wrap, then click on Wrap from the command bar. After clicking Wrap, you’ll be taken to the Wrap Wizard screen.
10. Select the apps to wrap
On the Select the app(s) to wrap screen, select your primary and secondary app.
Primary App: This is the main app that your users will interact with.
Secondary App(s): These are optional additional apps that can be bundled together.
11. Register app
On the Register app, select the existing app registration as we have created in step 4 i.e. WrapDemo. Registering an app is needed to uniquely identify it, enable required features, and allow publishing to app stores.
Provide Signature hash and click on Fix it, then proceed by clicking Next.
12. Configure Branding
On the Configure Branding screen, customize your app’s icon, color, and theme to match your branding preferences. Branding makes your app visually unique, ensuring consistency and helping users identify and trust your organization.
13. Target Platforms step
The Target Platforms step ensures the app is configured with a unique Bundle ID and tailored to run on specific operating systems (e.g., Android, iOS), while the platform sign-in process enables secure integration with required services like app stores.
Provide the Bundle ID (Package name) from earlier and select the Target platform as Android. Click on Next.
14. Manage output
To get an Authentication token, Click on Get App Center token. Select your existing App Center organization and the Android App Center location you set up earlier.
15. Wrap up
Finally, click Build to generate the APK file in the App Center. Your app is now wrapped and ready for distribution!
16. Sign the APK Package
Download the apk file from the app center which we have created in Step 7.
Now Navigate to the Android SDK location:
“C:\Users\{UserName} \AppData\Local\Android\Sdk\build-tools\34.0.0” and run the command prompt.
Run the following command to use the apksigner and sign the package:
apksigner.bat sign –ks PATH_TO_KEYSTORE –ks-key-alias KEY_ALIAS PATH_TO_APK
Now, your app is ready to install on Android mobile.
Conclusion
This streamlined process allows you to turn a Canvas app into a native Android app, making it ready for internal or external distribution. The wrapping feature brings the power of Power Apps to mobile users, enabling enhanced functionality and distribution flexibility.