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.
Solved! Go to Solution.
Authentication is on backlog. It'll be considered soon.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
You just need to produce an AJAX call to remote server via request, jquery, or other libraries.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
// inside the custom visual contructr
document.body.innerHTML = '<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>'
+'<input id="txtname" type="text" /></p>'
+'<input id="InsertRecord" type="button" value="Insert"></input>'
let bttnClick = document.getElementById("InsertRecord");
bttnClick.addEventListener("click", (e: Event) => this.getCall());
// out side the constructor and inside the visual class
getCall(){
$(function() {
$.getJSON("https://api.ipify.org?format=jsonp&callback=?",
function(json) {
document.write("My public IP address is: ", json.ip);
console.log(json.ip)
}
);
});
}
I used the above to call an web api that returns the public IP to console and I am getting the below error
API Reference : https://www.ipify.org/
Uncaught TypeError: $ is not a function
at Visual.getCall (<anonymous>:627:25)
at HTMLInputElement.<anonymous> (<anonymous>:614:89)
I might be missing jquery reference somewhere, but I couldn't figure it out. Any help would be greatly appreciated, thanks in advance.
Please follow this guide to import jQuery into your custom visual. You just need to replace d3 into jQuery wiht a proper version.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Power BI CV API does not provide authentication mechanism so far.
We'd recommend to implement your own authentication that will ask user to log in.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Authentication is on backlog. It'll be considered soon.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Is there any update regarding the Authentication?
We have the same client requirement - How can I authenticate myself against this external API so only authenticated users in PowerBI can call the API.
Auth API for Microsoft Services is in progress. No particular ETA yet.
For external services you should use OAuth of other methods for authentication.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Hello:
Is there any update on this?
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 |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |