Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
dakdgdl
New Contributor III

PowerBI Custom Visual - Licensing API - Doesn't return an attribute indicating the Service Plan Name

Hello Guys,

 

Our custome visual is now published in the Microsoft AppSource with 3 different plans as below.

Core, Pro and Enterprise.

 

When we call the Licensing API as below page guides, it returns the "ServicePlan" array with each array node having "State" and "spIdentifier" attributes.

https://learn.microsoft.com/en-us/power-bi/developer/visuals/licensing-api

 

But each request return a specific identifier, that we can not specifically identify whether the request sent by Core, Pro or Enterprise vesrsion,

So, Don't we have another attribute in the array nodes, like "Plan Name" or something similar?

Then we can specificaly validate the version and do the needful prompts to the user, based on the version/subscription he currently use.

 

Please advice on how to identify the service plan name, by the response got from this "Licensing API".

 

Thanks,

Lasantha

2 ACCEPTED SOLUTIONS
jaineshp
Valued Contributor

Hey @dakdgdl,

Yeah, the Licensing API only gives you spIdentifier and state - no friendly plan names. Pretty frustrating!

 

https://learn.microsoft.com/en-us/power-bi/developer/visuals/licensing-api

 

What I Did

1. Map Your Plan IDs Go to Partner Center โ†’ Your Offer โ†’ Plan Overview. Copy those Service IDs and create a simple mapping:

 

const planNames = {
"abc123-core-id": "Core",
"def456-pro-id": "Pro",
"ghi789-enterprise-id": "Enterprise"
};

 

2. Simple Plan Detection Function

 

function getUserPlan(servicePlans) {
const activePlans = servicePlans.filter(p =>
p.state === "Active" || p.state === "Warning"
);

for (let plan of activePlans) {
if (planNames[plan.spIdentifier]) {
return planNames[plan.spIdentifier];
}
}
return "No License";
}

 

3. Use It in Your License Check

 

this.licenseManager.getAvailableServicePlans()
.then(result => {
if (result.isLicenseInfoAvailable && result.plans) {
const userPlan = getUserPlan(result.plans);
// Now you know if it's Core, Pro, or Enterprise!
this.enableFeaturesFor(userPlan);
}
});

 

Pro Tips from Experience

  • Cache the license info - don't call the API repeatedly
  • Handle multiple active licenses (user might have upgraded)
  • Always check for "Warning" state too (grace period)
  • Test with different license scenarios

Why This Works

Microsoft intentionally doesn't expose plan names for security. The spIdentifier is your unique key - you just need to maintain the mapping yourself.

 

Fixed? โœ“ Mark it โ€ข Share it โ€ข Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

 

 

 

 

View solution in original post

dakdgdl
New Contributor III

Thanks...

As you saying each spIdentifier is a unique string based on the version/subscription.

So that it make sense..

View solution in original post

2 REPLIES 2
jaineshp
Valued Contributor

Hey @dakdgdl,

Yeah, the Licensing API only gives you spIdentifier and state - no friendly plan names. Pretty frustrating!

 

https://learn.microsoft.com/en-us/power-bi/developer/visuals/licensing-api

 

What I Did

1. Map Your Plan IDs Go to Partner Center โ†’ Your Offer โ†’ Plan Overview. Copy those Service IDs and create a simple mapping:

 

const planNames = {
"abc123-core-id": "Core",
"def456-pro-id": "Pro",
"ghi789-enterprise-id": "Enterprise"
};

 

2. Simple Plan Detection Function

 

function getUserPlan(servicePlans) {
const activePlans = servicePlans.filter(p =>
p.state === "Active" || p.state === "Warning"
);

for (let plan of activePlans) {
if (planNames[plan.spIdentifier]) {
return planNames[plan.spIdentifier];
}
}
return "No License";
}

 

3. Use It in Your License Check

 

this.licenseManager.getAvailableServicePlans()
.then(result => {
if (result.isLicenseInfoAvailable && result.plans) {
const userPlan = getUserPlan(result.plans);
// Now you know if it's Core, Pro, or Enterprise!
this.enableFeaturesFor(userPlan);
}
});

 

Pro Tips from Experience

  • Cache the license info - don't call the API repeatedly
  • Handle multiple active licenses (user might have upgraded)
  • Always check for "Warning" state too (grace period)
  • Test with different license scenarios

Why This Works

Microsoft intentionally doesn't expose plan names for security. The spIdentifier is your unique key - you just need to maintain the mapping yourself.

 

Fixed? โœ“ Mark it โ€ข Share it โ€ข Help others!


Best Regards,
Jainesh Poojara | Power BI Developer

 

 

 

 

dakdgdl
New Contributor III

Thanks...

As you saying each spIdentifier is a unique string based on the version/subscription.

So that it make sense..

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Users online (14,770)