web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

App License key - suggest a logic

(0) ShareShare
ReportReport
Posted on by 213

I have created an app, which expires in 3 months
I have added a functionality where I give a key to user and app can be extended further- by 6months or 1 yr
it is working fine but if app is used by a company on multiple tenants then same key can be used
how can I avoid this?
I can ask tenant id and generate a key based on that?
SaaS based does not allow encryption based on personal key?
I do not want to use stripe or api to check the key, it must be something within app.
I am using IsolatedStorage for key.

Please suggest a logic,

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Are you talking about a secret key / certificate within the Azure AD app registration?

    Thank you.

  • Ajay Jain Profile Picture
    213 on at

    secret key which will be stored via IsolatedStorage

    Secret key should work for specific Tenant ID, so same key should not be applied to another Tenant ID

    If I do encrypt my key with Tenant id that can be decrypted

  • Suggested answer
    YUN ZHU Profile Picture
    95,548 Super User 2025 Season 2 on at

    Hi, The following is just my previous practice, although it may not be a perfect solution, I hope to give you some hints.
    1. We generate the Activation Key based on the company name and Iussed date (For example: Valid for 3 days of issue.).

    2. Enter the company name and Activation Key when activating. But only the Production environment will verify the Iussed date, and customers can always install it in their Sandbox environments. But if they want to install it to another Production environment, they need to apply for a Key again.

    Hope this helps.
    Thanks.

    ZHU

  • Ajay Jain Profile Picture
    213 on at

    Thank you ZHU,

    This is what I want to know, how do you generate key for a SaaS environment based on company and date,
    and that key will not work in other environment.

    do you have any code example?

    Thanks

    Ajay

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans