Forum Discussion

pconnor's avatar
pconnor
Regular Visitor
9 years ago

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

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft 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.

     

     

  • G20Bastos's avatar
    G20Bastos
    Frequent Visitor

    Did you get to fix the problem?

     

    Help me, please!

     

    Thanks.