Forum Discussion
Power BI Custom Visual - License API Not Returning Trial or Purchase Information
I have published a custom visual on AppSource and I'm trying to use the Power BI License API (powerbi.licenses.getLicenseInfo()) to check the user's license status. However, the API does not return any trial or purchase detail in the response.
What I'm expecting:
Information such as isTrial, isLicensed, purchaseSite, and expirationDate to be returned correctly when the visual is installed from AppSource
What I'm experiencing:
- The API response is empty when No license purchase.
- when license purchase then no any flag for istrial or expiration date.
Thank you for confirming the API version and sharing the code snippet.
Based on your implementation, you're using the Licensing API correctly. However, if certain expected properties like "isTrial" or "expirationDate" are not returned, and you're unable to determine the license state through the API, this might require deeper investigation from the Microsoft Support team.
I recommend raising a support ticket with all the relevant details so our engineering team can look into it further.
Hope this helps. Please reach out for further assistance.
Please consider marking the helpful reply as Accepted Solution to assist others with similar issues.Thank you.
4 Replies
- v-veshwara-msftCommunity Support
Hi NileshBhayani ,
Thank you for reaching out with your query regarding the Power BI License API.
Here are a few things to check.1. Ensure you are using the correct version of the API, as the Licensing API is available from version 4.7. Check the apiVersion in your pbiviz.json file to confirm.
Transactability and license enforcement - Power BI | Microsoft Learn2. The API should support retrieving information on Power BI visual licenses assigned to the user, including details like isTrial, isLicensed, purchaseSite, and expirationDate. If these details are not being returned, it might be due to how the API call is being made or how the data is being handled.
3. The license information is cached on the Power BI host side during the session. Ensure that your visual is correctly fetching and handling this cached data.
If you continue to face issues, please raise a support ticket with detailed information about your implementation and any error messages you receive. Our support team will be happy to assist you further.
Link to raise support ticket: Microsoft Fabric Support and Status | Microsoft FabricIf this post helps, then please consider to Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best regards,
Vinay.- NileshBhayaniFrequent Visitor
Thank you v-veshwara-msft for your suggestion
in my visual "apiVersion": "5.11.0"
This is my code which i configure and called at constructor initialize- v-veshwara-msftCommunity Support
Thank you for confirming the API version and sharing the code snippet.
Based on your implementation, you're using the Licensing API correctly. However, if certain expected properties like "isTrial" or "expirationDate" are not returned, and you're unable to determine the license state through the API, this might require deeper investigation from the Microsoft Support team.
I recommend raising a support ticket with all the relevant details so our engineering team can look into it further.
Hope this helps. Please reach out for further assistance.
Please consider marking the helpful reply as Accepted Solution to assist others with similar issues.Thank you.