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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Túlio
Frequent Visitor

Power BI Authentication API doesn't work

The code below always returns the status NotSupported (The privilege is not supported in the current environment) when I use pbiviz package and import the visual.

The strange thing is that it works perfectly using the developer mode, I can get the token without any problem.

 

Tlio_0-1737397201683.png

 

 

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

powerbi-visuals-api: 5.11.0
Env: Web

 

5 REPLIES 5
pramodcog
Frequent Visitor

Hi,


I am facing same issue, did you get the authentication working for pbiviz file?

I would appreciate if you can share your solution if you have found one!

 

Best Regards,

Pramod

Hi @pramodcog,

 

Is your visual published in AppSource? If not and it's a privately built visual then according to the documentation, only visuals published to AppsSource or the developer visual can use the API. This is what I've found when building visuals for clients and they are currently weighing up whether to go through with this or look at alternative solutions.

 

If youre visual is available in AppSource, there are a bunch of other limitations that you might need to bear in mind also when considering if it's a suitable approach for your solution.

 

Regards,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




@dm-p Thanks for details.

 

I was in assumption that if I load .pbiviz file while having dev mode enabled from Options in PowerBI setting, it would behave as running the code in development.

 

I guess that is incorrect assumption?

 

Is there an alternate solution for getting access token of logged in user?

 

Best regards,

Pramod

Hi @pramodcog - no, the developer visual is the visual you use to develop your code against in the Power BI service. It is approved for use with this API so that you can develop and test against before you submit your visual to AppSource.

 

Using developer mode in Desktop just forces Power BI to load a local visual rather than load it from AppSource (if your visual has a GUID that matches an AppSource-published visual and is how Power BI atuo-updates custom visuals from AppSource without user intervention). This setting is only valid for the current session (until you close the workbook) and then it resets.

 

As far as I know the API you're trying is the only method that the team supports. You might be able to ask them if they have another way but it'll be unlikely that it's supported, however they can confirm that for you better than I can. They can be contacted at pbicvsupport@microsoft.com.

 

Best of luck,

 

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




@dm-p Thanks for quick and detailed response.

 

I will check with support team for alternate solution.

 

Regards,

Pramod

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors