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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
WiraYusoff
New Member

Update Basic Authentication Credentials with VBA Macro

Hi all,

 

Is there a way to update a data source's credentials (basic authentication) using a macro?

I would like to have a form where the user enters their username and password, and then pass the credentials to the data source. Rather than having the user click the Power Query ribbon -> Data Source Settings -> [Data Source] -> Edit -> Edit -> enter credentials -> Save -> Done -> Done.

 

I'm connecting to SAP HANA database and I need to pass the excel file to other users to run using their own credential once I'm done configuring the excel. 

 

Regards

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @WiraYusoff 

 

VBA is not supported in Power BI, if you need to restrict what users see you can use Row-level security, please see the link below.

https://docs.microsoft.com/en-us/power-bi/desktop-rls

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

1 REPLY 1
Mariusz
Community Champion
Community Champion

Hi @WiraYusoff 

 

VBA is not supported in Power BI, if you need to restrict what users see you can use Row-level security, please see the link below.

https://docs.microsoft.com/en-us/power-bi/desktop-rls

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.