Skip to content

Commit 85290ff

Browse files
committed
Merge branch 'master' into alaug-patch-1
2 parents 18540f7 + 5bc5569 commit 85290ff

16 files changed

+129
-0
lines changed

powerapps-docs/developer/data-platform/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@
359359
href: appendix-app-design-best-practices-checklist.md
360360
- name: 'Appendix: App certification checklist'
361361
href: appendix-app-certification-checklist.md
362+
- name: 'Appendix: Add licensing information to your solution'
363+
href: appendix-add-license-information-to-your-solution.md
362364
- name: Monitor your app in ISV Studio
363365
items:
364366
- name: Introduction to ISV Studio
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
title: "Appendix: Add licensing information to your solution | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "This article outlines the required steps to take license service IDs created in Partner Center and add them to the table definitions of your Dataverse solution." # 115-145 characters including spaces. This abstract displays in the search result.
4+
ms.custom: ""
5+
ms.date: 04/30/2021
6+
ms.reviewer: "pehecke"
7+
ms.service: "powerapps"
8+
ms.topic: "article"
9+
author: "nkrb"
10+
ms.author: "nabuthuk"
11+
manager: "kvivek"
12+
search.audienceType:
13+
- developer
14+
search.app:
15+
- PowerApps
16+
- D365CE
17+
---
18+
19+
# Appendix: Add licensing information to your solution
20+
21+
This article outlines how to add licensing information to a Microsoft Dataverse solution, package it, and upload the solution zip file to Microsoft AppSource. More information: [Create an AppSource package for your app](/powerapps/developer/data-platform/create-package-app-appsource).
22+
23+
The following steps are required to add license information to your solution:
24+
25+
- Clone existing solution.
26+
- Use the Power Apps CLI tool to add license information to the solution.
27+
- Build the solution, package it, and upload the zip file to AppSource.
28+
29+
## Download the latest version of the Power Apps CLI
30+
31+
You can download the latest version of Power Apps CLI from [here](/powerapps/developer/data-platform/powerapps-cli). The Power Apps CLI tool includes commands that are required for adding licensing information to the solution. To verify that you have the latest version of the tool:
32+
33+
1. Open a **Developer Command Prompt for VS 2017** or higher window.
34+
2. Enter the command `pac install latest`. This will install the latest version of the tooling.
35+
3. Enter the command `pac solution help` and verify that you see the `add-license` option in the list.
36+
37+
## Clone a solution
38+
39+
Use Power Apps CLI commands to clone the solution. To clone a solution:
40+
41+
1. Create an authentication profile for the environment where you want to add your solution by using the command:
42+
43+
```CLI
44+
pac auth create --name <name of your choice> --kind Dataverse -–url <your dataverse url> --username <your username> --password <your password>`
45+
```
46+
1. Clone the existing solution by using the command:
47+
48+
```CLI
49+
pac solution clone --name <your solution name> --outputDirectory <your chosen output directory>
50+
```
51+
52+
## Create licensing files
53+
54+
To add licensing information to your solution, you need to create two `.CSV` files using the text editor of your choice. The following are the two files that you need to create:
55+
56+
- **Plan definition file**: Define the details of the plans you created in the Partner Center.
57+
- **Plan mapping file**: Maps those plans to the components of your solution.
58+
59+
In this article, we will create two CSV files. You can choose any licensing approach you like. In this article, we will follow the **Russian doll** licensing model as shown in the following table:
60+
61+
|Plan|Gets access to|
62+
|------|--------|
63+
|Gold plan|Gold App, Silver App, Bronze App|
64+
|Silver plan|Silver App, Bronze App|
65+
|Bronze plan|Bronze App|
66+
|||
67+
68+
The solution contains three model-driven apps (Gold App, Silver App, and Bronze App) each model-driven app different from one another.
69+
70+
> [!div class="mx-imgBorder"]
71+
> ![Create licensing file 1](media/create-license-csv-file-1.png "Create licensing file 1")
72+
73+
To add licensing information to your solution, you need to create plans in the Partner Center. More information: [Create plans in Partner Center](/azure/marketplace/dynamics-365-customer-engage-plans). Once you're finished creating the plans, each plan creates a **Service ID** value which is required while creating [Plan definition file](#plan-definition-file).
74+
75+
> [!div class="mx-imgBorder"]
76+
> ![Create licensing file 3](media/create-license-csv-file-3.png "Create licensing file 3")
77+
78+
> [!NOTE]
79+
> Currently model-driven apps are the only types of solution components that can be mapped to licenses. In future releases, we plan to add support for other component types such as canvas apps and tables.
80+
81+
### Plan definition file
82+
83+
The plan definition file should contain the following columns:
84+
85+
- **Service ID:** This is created automatically when you create a plan in the Partner Center as part of the offer creation. More information: [Create plans in Partner Center](/azure/marketplace/dynamics-365-customer-engage-plans).
86+
- **Display Name:** The display name for your plan. The display name is shown to users on the license check error dialogs.
87+
- **More info URL:** The URL where you would like to direct users to get more information about the solution if they get any license check errors.
88+
89+
> [!div class="mx-imgBorder"]
90+
> ![Plan definition file](media/plan-definition-file.png "Plan definition file")
91+
92+
### Plan mapping file
93+
94+
The plan mapping file should contain the following columns:
95+
96+
- **Service ID:** This is created automatically when you create a plan in the Partner Center as part of the offer creation. More information: [Create plans in Partner Center](/azure/marketplace/dynamics-365-customer-engage-plans).
97+
- **Component name:** The solution component that you would like to restrict access to using license management. This name must match the name of the component in the **Name** column in the solution viewer.
98+
99+
> [!div class="mx-imgBorder"]
100+
> ![Plan mapping file](media/plan-mapping-file.png "Plan mapping file")
101+
102+
Once you have created your own licensing CSV files, the next step is to add the information from these files to your solution.
103+
104+
## Add licensing information
105+
106+
To add the license information from the CSV files (created above) to the solution:
107+
108+
1. Open a **Developer Command Prompt for VS 2017** or higher window. Navigate to the ___location where you have cloned solution. Enter the following command:
109+
110+
```CLI
111+
pac solution add-license -pd <path to plan definition file> -pm <path to plan mapping file>
112+
```
113+
1. To check whether the licensing information is added, navigate to the ___location where you have cloned your solution zip file, you should see a new folder **ServicePlans** is created with two XML files.
114+
1. Optional: To determine how the license information from the CSV files was captured, open the XML files in your favorite editor.
115+
1. The **ServicePlans.xml** file contains the plan definition information from the plan definition file.
116+
1. The **ServicePlansAppModules.xml** file contains the plan mapping information from the plan mapping file.
117+
118+
## Build the solution and create an AppSource package
119+
120+
1. To build a solution, see [Create a managed solution for your app](/powerapps/developer/data-platform/create-solution-app-appsource).
121+
122+
1. To validate whether the licensing information is included, after the solution is built, look for the licensing information in your solution `customizations.xml` file.
123+
1. To create the AppSource package, see [Create an AppSource package for your app](/powerapps/developer/data-platform/create-package-app-appsource).
124+
125+
## See also
126+
127+
[Appendix: App certification checklist](appendix-app-certification-checklist.md)
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)