Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JeffreyKelso
Frequent Visitor

Microsoft Graph Custom Connector Refresh

I have a custom connector that connects to Microsoft Graph in order to extract a daily report from a shared mailbox.  The oauth works perfectly within Visual Studio and on the desktop application, at least initially.  The problem comes when a refresh token is needed for a refresh by the on-premise gateway.  The connector doesn't seem to be able to request and apply the refresh token process.  Within Visual Studio I can edit the credential, hit refresh, and set it again to get a new refresh token, so I know the refresh function is working at least.  I assume this is because there is nowhere to store the refresh token so that it can be used on the next data refresh in order to obtain a new access token.  Has anyone been able to get oauth to work with Microsoft Graph using a gateway refresh?  Should I instead use an Azure Function to get the data from Microsoft Graph so that I can store the last refresh token within a data store?

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Hi @JeffreyKelso ,

 

What is the error message prompted?

See if these blog will help:

https://www.poweredsolutions.co/2018/04/23/refreshing-a-power-bi-custom-connector-in-the-cloud/ 

https://www.kasperonbi.com/how-to-enable-scheduled-refresh-for-your-custom-connector/ 

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.