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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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