Forum Discussion
Custom Connector, Gateway & OAuth
As the error message says - if you provide your own callback URI then you need to make sure whatever is at that URI will respond correctly to the callback.
The callback URI should be supplied via the OAuth workflow, I don't supply it, the return of the value is baked into Power BI's handling of OAuth.
I modfied my error message to include the full URI callback string and in reviewing the results its not actually the callback URI, it is the initiation URI that is passed as part of starting the process. Basically it is attempting to iniaiate the process, but then fails and goes straight to the Finish step (so not really a very elegant failure mode). This would align with the fact that a browser window appears briefly where I should be able to grant access as part of the OAuth workflow, but that window quickly disappears.
For anyone curious the URI contains the key for code, but there is no value, response_type is also blank.
Thus the question is, does anyone have tips on how to deal with the fact that there seems to be some issue with iniatiting the OAuth workflow, or is this simply one of the litany of issues with the OAuth workflow?
- v-nmadadi-msft9 months agoCommunity Support
Hi rpiboy_1 ,
Thanks for reaching out to the Microsoft fabric community forum.
There is a limitation related to On-prem Gateway and Oauth, please check if it is related to the error you are facing
When you use OAuth2 credentials, the gateway currently doesn't support refreshing tokens automatically when access tokens expire (one hour after the refresh started). If you get the errors "InvalidConnectionCredentials" or "AccessUnauthorized" when accessing cloud data sources using OAuth2 credentials even though the credentials were updated recently, you might be hitting this error. This limitation for long running refreshes exists for both VNet gateways and on-premises data gateways.
Troubleshoot the on-premises data gateway | Microsoft LearnI hope this information helps. Please do let us know if you have any further queries.
Thank you- rpiboy_19 months agoHelper V
I don't see how this could be a refresh error since the issue is occuring when trying to establish an initial connection, not once the connection is in use. As I noted in my follow-up reply furthe testing demonstrates that the correct data is not being returned on the grant, because I never get the chance to grant permission in the first place, the browser simply flashes.
- v-nmadadi-msft8 months agoCommunity Support
Hi rpiboy_1 ,
Sorry to know it didn’t help. Please consider reaching out to Microsoft Support. You can provide them with all the troubleshooting steps you've already taken, which will help them understand the issue better and provide a resolution. They might be able to identify something specific about your admin account setup or provide a solution that isn't immediately obvious.
Below is the link to create Microsoft Support ticket:Create a Fabric and Power BI Support Ticket - Power BI | Microsoft Learn
Thank you