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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
andrebadin
New Member

API: One url to two (or more) authentications

Hello how are you?

I need to consume data from an API as follows:

 

API url: ws.com.br/data/2020-01-20

 

user: abcd

password: 1234

 

However, I need to consume from the same API and simultaneously connect to the same url with a different user:

 

user: efgh

password: 5678

 

Is it possible in a single query to consolidate the data for both users? Hou can i write this in the power query?

 

Thank you very much!

1 REPLY 1
mahoneypat
Employee
Employee

Here are two ways you could do this

 

1. Hard code the credentials in two separate queries and then append them together.  Since the web calls likely return the same data (column names, etc.), the append should work smoothly.

 

2. Make a table with two columns to hold the username and passwords for both users. Then add a custom column that concatenates the userid and password into the web call.  Then expand the resulting tables to have all the data in one table.

 

To get a more detailed response, more info on the authentication for that API is likely needed.  Have you already worked out how to make a single web call one with set of credentials?  If so, either approach above should work.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors