Forum Discussion
Generate a JSON Web Token (JWT) in PowerBI/PowerQuery
Hi heriberto_mb ,
First you need to enable Python in Power BI. Go to 'File', choose 'Options and settings' -> 'Options', select 'Python scripting' from the left pane, and specify the path to your Python installation.
And then in Power Query, you can invoke your Python script. However, it's important to note that directly executing scripts that generate JWTs and interact with external APIs might require additional steps or workarounds, as Power Query primarily focuses on data transformation and loading.
And another approach might be to generate the JWT outside of Power BI and then import it as a parameter or directly within your query to authenticate against the GitHub API. This method would involve running your Python script externally and using the output token within Power BI.
If you're looking to automate or streamline this process entirely within Power BI, you might need to explore custom connectors or invoking web services with pre-generated tokens.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.