context.license returns null for users with a Jira application role who are also in a guest group

XMLWordPrintable

    • Severity 3 - Minor
    • Resiliency

      Issue Summary:

      context.license returns null for a user who holds a Jira application role but is also a member of a guest group (jira-guests-*).

      The Forge platform classifies these users as UNLICENSED because the guest check takes precedence over the application-role check. Marketplace app licence data is therefore omitted from the Forge Context Token, so apps performing a standard licence check show an "invalid license" state to users who are actually licensed. 

      Steps to Reproduce

      • Install a Forge app with licensing.enabled: true that reads context.license via view.getContext().
      import { view } from '@forge/bridge';
      const context = await view.getContext()
       
      • As a user holding a Jira application role (member of jira-users-* or jira-administrators), open the app and confirm it loads — context.license.active is true.
      • Add that same user to the site's guest group (jira-guests-*).
      • Reload the app as that user.

      Expected Results

      context.license reflects the app's actual Marketplace licence status. A user holding a Jira application role is treated as licensed regardless of additional guest group membership.

      Actual Results

      context.license is null and the app renders its invalid-licence state.

      view.getContext() returns:

       

      {
        "accountId": "712020:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "cloudId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "moduleKey": "hello-world-admin-page",
        "environmentType": "PRODUCTION",
        "license": null
      }
      

      The same call for an unaffected user on the same site returns:

       

      "license": {
        "active": true,
        "type": "commercial",
        "billingPeriod": "MONTHLY",
        "isEvaluation": true,
        "capabilitySet": "capabilityAdvanced"
      }
      

      Workaround

      Remove the affected user from the jira-guests-* group. This restores the correct licence object, but changes the user's access model. 

              Assignee:
              Abhishek Ghosh
              Reporter:
              Nitin Rastogi
              Votes:
              6 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: