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
pconnor
Regular Visitor

Power BI Embeded - Unable to connect to remote server

Hi everyone,

 

I have followed the tutorials for embeding a Power BI report into a website and I have got the code working fine on my local machine/development environment, however, when the code is released onto production machines, I am unable to connect to the Azure AD service.

 

the line of code:

authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, ClientId, credential);

-- using the Microsoft.IdentityModel.Clients.ActiveDirectory library

 

Is throwing the exception message:

Unable to connect to the remote server

 

I assume this is because the production environment is locked down, but I am not sure what I need to allow to be able for it to see the remote server. Ports 80 and 443 are open, from reading around I thought these were the only ones needed.

 

Any help much appreicated,

Thanks.

2 REPLIES 2
G20Bastos
Frequent Visitor

Did you get to fix the problem?

 

Help me, please!

 

Thanks.

Eric_Zhang
Employee
Employee


@pconnor wrote:

Hi everyone,

 

I have followed the tutorials for embeding a Power BI report into a website and I have got the code working fine on my local machine/development environment, however, when the code is released onto production machines, I am unable to connect to the Azure AD service.

 

the line of code:

authenticationResult = await authenticationContext.AcquireTokenAsync(ResourceUrl, ClientId, credential);

-- using the Microsoft.IdentityModel.Clients.ActiveDirectory library

 

Is throwing the exception message:

Unable to connect to the remote server

 

I assume this is because the production environment is locked down, but I am not sure what I need to allow to be able for it to see the remote server. Ports 80 and 443 are open, from reading around I thought these were the only ones needed.

 

Any help much appreicated,

Thanks.


@pconnor

You can try to shut down the firewall of the production with approval the of the server admin. If then it works well, it is some port that maybe blocked. Another approach would be using fiddler to trace the network traffic to see what http requests are blocked/returning response status code other than 200.

 

 

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.