Forum Discussion
OAuth for Power BI Custom Connector issues
- Anonymous2 years ago
Hi pgarman ,
Based on my understanding and research, your approach of generating a Bearer Token via OAuth to access certain APIs seems to support an “anonymous” connection mode. However, it’s important to note that this Bearer Token is dynamic and typically has a validity period of one hour. If you wish to implement a method for dynamically generating the Bearer Token, you’ll need to use M query to obtain the latest Bearer Token in real-time during each data refresh. You can refer to the following links to determine if they provide any helpful insights:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have set up a connector using Anonymous rather than OAuth, but it is not reliable - about 25% of the initial connections or data refreshes return an error from Power BI Desktop that the credentials could not be authenticated.
I suspect this might be due to the connector requesting a new token with each 'page' of records, but it's hard to see what is actually happening since Power BI does not give the actual error message from the data source being queried.