Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to create a custom visual that use the SpRestLib to add/edit/remove rows in a sharepoint list. I have written the javascript and imported the library and it seems that there are no errors in the code.
When I run it to test it I recived an error of the networ saying:
Access to XMLHttpRequest at https://app.powerbi.com/_api/contextinfo' from origin 'null' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header has a value 'https://teams.powerbi.com' that is not equal to the supplied origin.
I have tried to do it from a sharepoint aspx page and everything works fine there since it is on the same platform and I have no problem with CORS. I have always had a hard time understanding calls to apis, headers, security, etc. Can anyone help me to solve the issue?
Thanks in advance
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |