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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Eshan9163
Frequent Visitor

Unable to refresh a dataset of M Code for Gemini API call in Power BI Service

I have written M code in advance editor of PBI Desktop to call Gemini API and build a table of single cell consisting the response of Gemini based on the given prompt. In PBI desktop, the response data obtained from API call is refreshed based on the applied filters by selecting manual refresh each time. However, I am unable to refresh it on the Power BI service. I am getting an error as "You have no personal gateways installed" even after installing an on-premise gateway.  The installed gateway reflects as active but still I am unable to refresh.
1.JPG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Eshan9163,

 

I suggest reaching out to Microsoft Support by raising a ticket. Microsoft will analyze backend logs and provide a resolution.

 

Below is the link to create Microsoft support ticket:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket 

 

Regards,

Vinay Pabbu

View solution in original post

11 REPLIES 11
ibarrau
Super User
Super User

Hi. If that's your only source, ignore the message and go to Semantic model settings, open data source credentials and edit them. The gateway is showing that it is a cloud connection. You don't need a gateway (unless you are doing some python or R inside)

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Anonymous
Not applicable

Hi @Eshan9163,

 

Thank you for reaching out to Microsoft Fabric Community Forum.

 

Based on the screenshot above, the gateway status is "Not configured correctly", indicating an incomplete connection setup.

The Web data source (Gemini API) is mapped to "Personal Cloud Connect". Since the Google Gemini API is a cloud service, an on-premises gateway is not required.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!


Regards,
Vinay Pabbu

Thank you for the suggestion.

I have deleted the on premises gateway connection and tried connecting through personal cloud connect but still I am getting error. I have set authentication method as anonymous and privacy level as public. Please refer the below given image


Capture.JPG

This is the full error message

Unable to update connection credentials. Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue.

Details: Web.Contents failed to get contents from 'https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash-8b:generateContent?key=AIzaSyBG...' (404): Not Found Please have this information handy if you choose to create a support ticket. Session Id: 141c063e-b01d-4211-baa3-667825d1b8e1 RequestId: 0cd16f24-1417-48d3-b036-411df2ee36a5 Cluster URI: https://api.powerbi.com Status code: 400 Time: Fri Feb 28 2025 15:48:39 GMT+0530 (India Standard Time)

 

Hi. If the API is your only source, if you only have tables from cloud sources, try not using the gateway at all. Open the Power Bi Service. Go to Semantic Model Settings and edit credentials:

ibarrau_0-1740747553292.png

I hope that helps


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

Happy to help!

LaDataWeb Blog

Thank you for the response.

I am unable to select the datasource credentials option. Please check the below attached screenshot.

Capture.JPG

Anonymous
Not applicable

Hi @Eshan9163,

 

Check if you have the correct permissions:
Ensure you are an admin or owner of the dataset.
Locate to your dataset, click the three dots (⋮), and select Manage Permissions.
Verify your role to confirm you have the necessary access.

 

Regards,

Vinay Pabbu

Hello,

 

Thanks for the response.

 

I have admin permissions. Is there any additional settings that I need to make as an admin in my premium per user account?

Thanks and regards,

Eshan Kumar

Anonymous
Not applicable

Hi @Eshan9163,

 

If the 'Data Source Credentials' option is disabled (grayed out) in Power BI Service, it usually means that Power BI does not recognize the API request as a valid data source or that your M code uses dynamic URLs, causing it to be classified as an 'unsupported cloud data source.'
If the option is editable, set the authentication method to OAuth or as required by the API.

 

Regards,

Vinay Pabbu

Hello @Anonymous ,

I tried to set the authentication method as OAuth2 as shown in the below attached screenshot but still it's the same.

Screenshot 2025-03-07 165656.png

Anonymous
Not applicable

Hi @Eshan9163,

 

I suggest reaching out to Microsoft Support by raising a ticket. Microsoft will analyze backend logs and provide a resolution.

 

Below is the link to create Microsoft support ticket:
https://learn.microsoft.com/en-us/power-bi/support/create-support-ticket 

 

Regards,

Vinay Pabbu

Anonymous
Not applicable

Hi @Eshan9163,

 

As we haven't heard back from you, I hope you have raised a support ticket. At this time we are closing this thread. If you have any further issues, please start a new thread in the community forum, and we are here to assist you. Thankyou for your understanding and continuous support.

Thank you for being part of the Microsoft Fabric Community.

 

Regards,

Vinay Pabbu

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.