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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.