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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How to connect the PowerBi with UIPath swagger Api

I'm trying to connect to swagger ui-path api but getting error as 

"We couldn't authenticate with the credentials provided"

I have used the api url and Authorization key also

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Yes i got the solution.

 

follow below m code:

 

below power query

let
Source = Json.Document(Web.Contents("url", [Headers=[Authorization="Bearer " & "apikey"]])),
#"Converted to Table" = Table.FromRecords({Source}),

in
#"Converted to Table"

 

and for dynamic token generation follow below m code:

let
url = "apilink",
headers = [#"Content-Type" = "application/json"],
postData = Json.FromValue([tenancyName="*****",usernameOrEmailAddress="*****",password="*****"]),
response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),
#"Converted to Table" = Record.ToTable(jsonResponse),
#"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "result")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Value"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Value", type text}})
in
#"Changed Type"

 

View solution in original post

5 REPLIES 5
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team _ kalyj

Anonymous
Not applicable

Yes i got the solution.

 

follow below m code:

 

below power query

let
Source = Json.Document(Web.Contents("url", [Headers=[Authorization="Bearer " & "apikey"]])),
#"Converted to Table" = Table.FromRecords({Source}),

in
#"Converted to Table"

 

and for dynamic token generation follow below m code:

let
url = "apilink",
headers = [#"Content-Type" = "application/json"],
postData = Json.FromValue([tenancyName="*****",usernameOrEmailAddress="*****",password="*****"]),
response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
jsonResponse = Json.Document(response),
#"Converted to Table" = Record.ToTable(jsonResponse),
#"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "result")),
#"Removed Other Columns" = Table.SelectColumns(#"Filtered Rows",{"Value"}),
#"Changed Type" = Table.TransformColumnTypes(#"Removed Other Columns",{{"Value", type text}})
in
#"Changed Type"

 

Anonymous
Not applicable

  1. Click Manage Packages then search for and install UiPath.Database.
  2. Activities. Navigate to the Activities and drop a Flowchart (Workflow -> Flowchart -> Flowchart) onto the process.
  3. Drop a database Connect activity (App Integration -> Datbase -> Connect) after the Start activity.
  4. Double-click the Connect activity and configure the Connection.

This may help you,

Rachel Gomez

Anonymous
Not applicable

Thanks @amitchandak i'm able to connect by using 

below power query

let
Source = Json.Document(Web.Contents("url", [Headers=[Authorization="Bearer " & "apikey"]])),
#"Converted to Table" = Table.FromRecords({Source}),

in
#"Converted to Table"

 

 

Now I want to get the api-key from the swagger uipath dynamically and stored into a function also  it will be the post method, do you have any ideas.

amitchandak
Super User
Super User

@Anonymous , refer if this can help

https://docs.microsoft.com/en-us/power-query/handlingauthentication

 

if needed

https://community.powerbi.com/t5/Developer/Rest-API-Authentication-API-Key/m-p/1314965

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Kudoed Authors