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
dinoscool3
Helper II
Helper II

Anonymous Credintials when credentials are in query

I have a connection to some data on a forum. The credntials to connection (username, API) are in the query that I'm using, and then I connect using annonymous credentials.

 

This works fine on Desktop. However, on the web version and in dataflows it won't save properly. It only saves the credentials dataflow by dataflow, so I can't copy a dataflow easily. And I can't set up automatic refresh from the desktop connector.

 

How can I connect once without having to connect again and again and allow for automatic updates, its very tedious

 

An example of my query is here:

 

= (queryID) => let
        resultCount = 1000,
        otherNameForPage = 0,

        GetPage = (otherNameForPage) =>
            let
                content1 = "params={""page"":""" & Number.ToText(otherNameForPage) & """}",
                RawData = Json.Document(Web.Contents(
                    "https://test.com/admin/plugins/explorer/queries",
                    [RelativePath=Number.ToText(queryID) & "/run",
                        Query=
                        [
                            params="{""page"":""" & Number.ToText(otherNameForPage) & """}"
                        ],

                        Headers = [ 
                        #"api-username"="XXX",
                        #"api-key"="XXX",
                        #"Content-Type" = "application/x-www-form-urlencoded"],
                        Content = Text.ToBinary(content1)
                    ]
                    
                ) ),
                resultCount = RawData[result_count]
            in
                if RawData[result_count] = 0 then null else RawData,
            Pages = List.Generate(
                () => [i = 0, RawData = GetPage(i)],
                each [RawData] <> null,
                each [i=[i]+1, RawData = GetPage(i)],
                each Table.Combine(let raw = [RawData] in List.Transform(raw[rows], each Table.FromRows({_}, raw[columns])))),
            Output = Table.Combine(Pages)
in
    Output
1 REPLY 1
Anonymous
Not applicable

Hi @dinoscool3 

If you can use anonymous authentication to access root url of your api, you are able to use anonymous authentication to refresh dataset in Power BI Service .

I searched a similar issue , you can refer to it .

https://community.powerbi.com/t5/Service/Power-BI-Service-Refresh-of-data-on-API-using-POST-method/m...

https://powerbiexperience.com/en/how-to-get-and-automatically-refresh-apis-data/

 

Best Regard

Community Support Team _ Ailsa Tao

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

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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