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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Trisped
New Member

Power BI Embedded authorityUrl is null

I setup the PowerBI-Developer-Samples and configured the AppOwnsData project to run on my computer without issues.

When I published the website to our web server the AuthorityUrl is null.

Looking at the code, the AutorityUrl is set by calling:

private static readonly string AuthorityUrl = ConfigurationManager.AppSettings["authorityUrl"];

I checked the web.config files and there is not a setting for authorityUrl (or for resourceUrl or apiUrl).

 

How do these settings get populated?  What would cause them not to populate when run on one machine as opposed to another?

1 ACCEPTED SOLUTION

Thanks MAK89.

 

I ended up finding the Cloud.config file while poking around the project files.  All I had to do was include the file in the project and set the "Copy to Output Directory" to "Copy always".  This copied the settings into the output folder when I published the project.

View solution in original post

2 REPLIES 2
MAK89
Frequent Visitor

You can do this in web.config in <appSettings></appSettings>

 

<appSettings >
     <add key="authorityUrl" value="https://login.windows.net/common/oauth2/authorize/" />
<add key="resourceUrl" value="https://analysis.windows.net/powerbi/api" />
<add key="apiUrl" value="https://api.powerbi.com/" />
<add key="embedUrlBase" value="https://app.powerbi.com/" /> </appSettings>

 

Thanks MAK89.

 

I ended up finding the Cloud.config file while poking around the project files.  All I had to do was include the file in the project and set the "Copy to Output Directory" to "Copy always".  This copied the settings into the output folder when I published the project.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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