We have created a API which takes data from PowerBI and provides output in JSON format. We have made some modifications to the original pyadomd code, and it runs without errors. However, it is not displaying the PowerBI data in JSON format as it should. Original code: https://pypi.org/project/pyadomd/. from sys import path path.append('\\Program Files\\Microsoft.NET\\ADOMD.NET\\160') from pyadomd import Pyadomd from flask import Flask, jsonify app = Flask(__name__) @app.route('/Alpino') def get_data(): conn_str = 'Provider=MSOLAP;User ID=Alexw@dettol.com;Data Source=powerbi://api.powerbi.com/v1.0/myorg/Power BI Model [Test];initial catalog=PBI_Model_20230121;Password=Alexw#2023;Persist Security Info=True;Impersonation Level=Impersonate;' query = """EVALUATE Project""" with Pyadomd(conn_str) as conn: with conn.cursor().execute(query) as cur: data = cur.fetchall() print(data) return jsonify(data) if __name__ == '__main__': app.run() For better understanding of Pyadomd library, see also the link above. Output: No PowerBI Data are fetched & Return with 404 Error: I think app.route is unable to fetch the file path. When we have used default code it generates Authentication error & after modification now it is not showing output in JSON format. When we mention alpino in url file path it provides 404 error. Continue reading...