Forum Discussion
Schedule Refresh is failing - Data Source Credentials for the HTTP request response
Hi Team,
My team is publishing release documents in the Cloud_web for each release after a certain data ( no fixed Dates ).
By using a power query custome function, i am getting a response code from an http request ( i gave an http URL in custome function ) in Power bi desktop to show to the USER/LEADERSHIP THAT link is available or not. like below
After writing the custome function; I am getting below info
Status: 404/200
Message: Link is not Available/Link is Available
In PBI Desktop using DAX I am giving Dynamic fill color to the Card value based on the Message to the URL ( Dynamic URL gave bu using button placing top of the Card visual ). So that the User/Leadership get to know that the link info available or not.
SFP.R.12.1 ( Link is Available )
SFP.R.12.2 ( Link is not Available )
Moreover, I have other datasourece ( Sharepoint excel + Other Cloud sources - I have given those credentials in service already )
Data Source Credentials:( DSC )
While giving credentials for the http request URL ( Let' say SFP.R.12.2 ( Link is not Available ) ).
Do i need to give credentials for that URL as well.
I gave the DSC but i am getting error ( Beacuse the document is not published for the SFP.R.12.2 that is why i am getting 404 in thebelow message ) -- Will it impact the Schedule Refresh(SC)? & If I skip the test connection, will it give SC success.
( Failed to update data source credentials: Web.Contents failed to get contents from 'https://amedeloitte.sharepoint.com/sites/xxxxxxxxxxxxx/_api/web/getfilebyserverrelativeurl('/sites/DOL-c-US-SMPinfo/SitePages/Internal-Release-Notes-SFP.R.12.1.aspx')/$value' (404): Not Found )
Hi KR300
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
We really apologize for the inconvenience, after reviewing the issue of schedule refresh is failing data source credentials for the HTTP request response, here are few steps to may resolve the issue.
- Make sure that all data source credentials are properly configured and authenticated in the Power BI Service.
- Verify that the HTTP request URL is accessible and returns the expected response. If the document hasn’t been published, consider implementing a way to handle 404 errors gracefully in your custom function.
- Adjust the custom function to manage 404 errors without causing the entire refresh to fail. You can return a default value or log the error for further analysis.
- If possible, isolate the HTTP request URL query from the other data sources to identify the issue more easily and prevent it from impacting the overall refresh process.
- The team utilizes additional data sources, including SharePoint Excel and other cloud services, for which the credentials have already been configured in the service. When attempting to enter credentials for the HTTP request URL, they encounter an error because the document has not been published, resulting in a 404 error.
Here is the link to the documentation that might assist in resolving the issue.
https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-scheduled-refresh
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Regards,
Menaka.Hi KR300 ,
We really apologies for the inconvenience.
Enable "Skip Test Connection" in Power BI Service. Since this HTTP request URL might not always be available, try skipping the test connection when setting up the credentials in Power BI Service:- Navigate to Power BI Service and go to the Dataset settings.
- Find the HTTP data source.
- Click on Edit credentials.
- Enable the option to Skip test connection.
- Save the changes and try the scheduled refresh again.
If the HTTP check is part of a larger dataset refresh, consider: - Separating the HTTP request into a standalone table that refreshes independently.
- Using dataflows to manage this step separately from other sources.
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Regards,
Menaka.
10 Replies
- v-menakakotaCommunity Support
Hi KR300
Thank you for reaching out to us on the Microsoft Fabric Community Forum.
We really apologize for the inconvenience, after reviewing the issue of schedule refresh is failing data source credentials for the HTTP request response, here are few steps to may resolve the issue.
- Make sure that all data source credentials are properly configured and authenticated in the Power BI Service.
- Verify that the HTTP request URL is accessible and returns the expected response. If the document hasn’t been published, consider implementing a way to handle 404 errors gracefully in your custom function.
- Adjust the custom function to manage 404 errors without causing the entire refresh to fail. You can return a default value or log the error for further analysis.
- If possible, isolate the HTTP request URL query from the other data sources to identify the issue more easily and prevent it from impacting the overall refresh process.
- The team utilizes additional data sources, including SharePoint Excel and other cloud services, for which the credentials have already been configured in the service. When attempting to enter credentials for the HTTP request URL, they encounter an error because the document has not been published, resulting in a 404 error.
Here is the link to the documentation that might assist in resolving the issue.
https://learn.microsoft.com/en-us/power-bi/connect-data/refresh-scheduled-refresh
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Regards,
Menaka.- KR300Helper III
Thanks for the info . i will go through the link
Here is the my Power query for the HTTP Response:
//(url as text) as record =>
let
response = Web.Contents("https://amedeloitte.sharepoint.com/sites/DOL-c-US-SMPinfo/SitePages/External-Release-Notes-"& FixVersionName &".aspx", [ManualStatusHandling={404,400,500}]),
responseStatus = Value.Metadata(response)[Response.Status],
result =
if responseStatus = 200 then [Status = 200, Message = "Link is Available"]
else if responseStatus = 404 then [Status = 404, Message = "Link is not Available"]
else if responseStatus = 400 then [Status = 404, Message = "Link is not Available"]
else [Status = responseStatus, Message = "Other Error"]
in
resultResult:
Status: 404 / 200
Message: Link is not Available / Link is not Available
Based on the Info : I am showing in the report using Card visual / button ( for the dynamic URL purpose I
SFP.R.12.1 ( Red color ) + showing ( Link is not Available / Link is not Available ).
v-menakakota GilbertQ can you pls help me how to customise the below query or we need to isolate that one . Because In PBI desktop, we are getting http request info after refreshing but in PBI service getting error if the document is not published yet causing entire schedule refresh failing.
- v-menakakotaCommunity Support
Hi KR300 ,
We really apologies for the inconvenience.
Enable "Skip Test Connection" in Power BI Service. Since this HTTP request URL might not always be available, try skipping the test connection when setting up the credentials in Power BI Service:- Navigate to Power BI Service and go to the Dataset settings.
- Find the HTTP data source.
- Click on Edit credentials.
- Enable the option to Skip test connection.
- Save the changes and try the scheduled refresh again.
If the HTTP check is part of a larger dataset refresh, consider: - Separating the HTTP request into a standalone table that refreshes independently.
- Using dataflows to manage this step separately from other sources.
If this post was helpful, please give us Kudos and consider marking Accept as solution to assist other members in finding it more easily.
Regards,
Menaka.