Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
Our organization is interested in developing a custom visual that allows users to authenticate to a third-party service, just like ArcGIS Enterprise in their custom visual, Maps for Power BI (See "New connections options" in March 2020 feature summary). Any clues for how could such UI interaction be accomplished?
We're thinking of approaching this via React, although we're facing difficulties:
Any help will be greatly appreciated
-Andres F
Hi @Anonymous,
The key difference here is that the ArcGIS is an incredibly special case: it's a core visual provided by a third party, rather than a custom visual, and as such is subject to elevated privileges in the main UI window.
Due to iframe sandboxing with custom visuals, there are two ways to work with external URLs at this time:
I am aware of a couple of vendors whose visuals are part of a suite of services they provide and have had to manage auth back these systems in their custom visuals by providing users with resources such as user-specific API keys that they can add as properties to the visual and validate these using the second method.
Your scenario isn't something I've needed to explore previusly, but if I were to attempt your challenge and I'm using React, I might start with the following thought process:
This is the result of a couple minutes' brainstorming, so not suggesting it's definitely a way to do this but might open some avenues for you.
Probably not the answer you were after, I'm sure, but hopefully may allow you to approach the challenge from a different angle.
Good luck,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thanks a lot for your thorough response, @dm-p ! It definitely sheds some light in how to approach our desired requirements.
Regarding authentication, however, we have the particularity of it being restricted to open id connect, so we do need to show a confirmation dialog that would then return the access token (not just an "async call from this form in my code to submit credentials and retrieve a token").
We're thinking of serving this dialog via a popup; would you happen to know if there are also restrictions for popups form Power BI?
Hi @Anonymous,
I'm fairly sure this isn't an option. If you inspect the visual's iframe you'll only see the following attribute set for sandbox:
As allow-modals and allow-popups are not set, then the sandbox should not permit this to happen.
Personally, I have had limited success with getting an alert() to work in Power BI Desktop, but not in the Service when the report is deployed, or when using the developer visual so have abandoned any further attempts.
I think that if you want to implement via OAuth-based login, then this avenue may not be open to you - I have had discussions with colleagues in this space who offer commercial visuals who have had no luck implementing or requesting the sandox limitations be lifted so that they can.
You can try contacting the team at pbicvsupport@microsoft.com to see if they have any further suggestions, but I suspect you might get a similar answer, unfortunately. Can't hurt to ask though if you need a definitve answer from MS.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
22 | |
2 | |
2 | |
2 | |
2 |