cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AmirBakht
Helper IV
Helper IV

Creating a license for my PowerApps Managed Solution

Hi,

 

I'm creating a PowerApps managed solution for distribution to clients. I would like the solution to be licensed to them for 12 months from the moment of first installation, after which I would issue them a new license to extend their solution. I understand there are different ways of doing this, but can't find any best practices or standardized approaches. Anyone familiar with the best way of doing this? How are you doing it?

Thanks in advance.

 

Regards.

 

P.S. Posted this in the Building area but I guess this belongs in here?

1 ACCEPTED SOLUTION

Accepted Solutions

Firstly Appsource provides no functionality regarding licensing - the reason for the lack of information about it is because no such functionality exists.

 

And sadly it will take you a long time to find a means of doing this as it requires understanding a lot of moving targets  including:

1) externally recording organisation IDs so that you can't just reinstall, with probably a license server to manage that and delivery trial and actual licenses,

2) how to create the license yourself

3) How to validate that the license is valid and not expired

4) where to add kill switches to your code so that you get people to license the software but not stop them uninstalling the solution (I'll add that bit as we've done that in the past).

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

View solution in original post

7 REPLIES 7
ben-thompson
Solution Sage
Solution Sage

Microsoft do not offer a license solution that can be used to disable a solution after installation so you need to create that yourself  - my company wrote such a thing but I've struggled to get the economics of delivering such a service right so it no longer features in our current plans.

 

So I think it depends on how you plan to distribute your solution to clients - if you deal with them directly you probably haven't got much to worry about, if you install a trial version via appsource you need a kill switch to disable the functionality people don't subscribe.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Thanks @ben-thompson 

My understanding is installing a component per client that contains feature and expiry dates and the app checks its validity against this component should do the trick. This would work with direct clients. Working with the AppSource, I couldn't find a logic that says 1 year after installation for example. How do you do a dynamic kill switch so that the expiry date is not hard coded since it would not be a per client instance? Also, what prevents them from uninstalling and reinstalling at end of expiry if it is from the AppSource?

I'm still in the process of registering with the AppSource, so not sure about the functionalities they provide for Apps not hosted with me.

Firstly Appsource provides no functionality regarding licensing - the reason for the lack of information about it is because no such functionality exists.

 

And sadly it will take you a long time to find a means of doing this as it requires understanding a lot of moving targets  including:

1) externally recording organisation IDs so that you can't just reinstall, with probably a license server to manage that and delivery trial and actual licenses,

2) how to create the license yourself

3) How to validate that the license is valid and not expired

4) where to add kill switches to your code so that you get people to license the software but not stop them uninstalling the solution (I'll add that bit as we've done that in the past).

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

View solution in original post

Thanks @ben-thompson ... really appreciate it. Looking forward to reading the 4th part.

Also to add to this, since the canvas app itself does not let its managed property be set, any licensing logic applied within the app can be removed by the client who can edit it. Worse than that, how do you stop them from editing your app or exporting it for themselves? That bothers me now.

I was leaving it there but as part 4 does look like it's incomplete I will add this.

 

You need to add license check software at places where you wish to confirm a license exists (so when a plugin is triggered or within a PCF component). However if you add the license check on a delete command you have a problem. As to delete a solution all entities within the solution must be emptied and then removed. Which means that if you have any license check on record deletion you end up with a solution that cannot be removed as soon as the license has expired. 

 

So the attempted removal of the solution goes:-

 

delete all records from entity being removed

License check throws exception stopping record being deleted

Solution removal stops as entity is not empty and cannot be removed.

---
If this post has answered your question please consider it for "Accept as Solution" or if it has been helpful give it a "Thumbs Up".

Thanks @ben-thompson you're a legend!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (61,919)