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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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