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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
pcho
Frequent Visitor

Passing parameters from c# code to M query parameter failed

Hi, I am trying to understand why the ‘UpdateMashupParametersRequest’ (img1) code is working in the AppOwnsDataStarterKit sample app, but not in my app(img2)!! I am seeing a dataset error in (img3). Wondering is it because I am using authentication type as ‘Service Principal’??

App-Owns-Data-Starter-Kit->PowerBiServiceApi.cs->OnboardNewTenant

App-Owns-Data-Starter-Kit/Docs at main · PowerBiDevCamp/App-Owns-Data-Starter-Kit · GitHub

 

img1

pcho_1-1720035943315.png

img2

pcho_3-1720036094477.png

img3

pcho_4-1720038361906.png

 

 

Thanks,

-Peter

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pcho,

For the error message, it seems like your connection string include dynamic part which can't be schedular refresh.

Have you tried to modify your M query with optional parameter to handle these scenario, and use the new version report in the sample?

Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code 
Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @pcho,

For the error message, it seems like your connection string include dynamic part which can't be schedular refresh.

Have you tried to modify your M query with optional parameter to handle these scenario, and use the new version report in the sample?

Using The RelativePath And Query Options With Web.Contents() In Power Query And Power BI M Code 
Regards,

Xiaoxin Sheng

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.