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
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
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.

Top Solution Authors