Forum Discussion
How to refresh ODATA API with OAuth2?
Anonymous,
The OAuth2 Flow is not supported currently when refreshing web API/Odata API in Power BI Service, there is an idea about this issue, please vote it up.
To work around this issue, you can customize your M scripts by using relative path, then use Anonymous authentication In Power BI service. There are some similar threads for your reference.
https://community.powerbi.com/t5/Integrations-with-Files-and/Dataset-Refresh-REST-API-amp-JSON-with-required-Param-in-PB/td-p/331814
https://community.powerbi.com/t5/Service/Refreshing-a-Restful-Data-Source-with-API-Key/td-p/131298
Regards,
Lydia
Thanks Anonymous Lydia,
Isn't there a way to do this using a Gateway?
- Anonymous8 years agoNot applicable
Anonymous,
Currently, gateway doesn't support OAuth2 in this case, you would need to change M scripts in Power BI Desktop firstly , then use anonymous authentication in Power BI Service.
Regards,
Lydia