Forum Discussion

dbeavon3's avatar
dbeavon3
Icon for Memorable Member rankMemorable Member
4 years ago
Solved

Web Connector for Customer Web API

Is anyone familiar with the OAuth2 handshake between Power BI's "Web" connector and the AAD?   I have a customer with a proprietary web api.  The API can be changed as needed to perform the oauth2 h...
  • dbeavon3's avatar
    dbeavon3
    4 years ago

    Thanks v-henryk-mstf 
    I have a workaround but it was a pain.  The inflexibility of this Oauth2 handshake is the biggest problem.  I'm not sure why the "Web" connector in PBI can't allow us to specifiy an arbitrary APP ID to use when generating an access token.  That would be easier than placing a dependency on a URL hostname, (that places a dependency on the AAD "registered domain names", that places a dependency on DNS).  What a mess....  All I want to do is connect to https://localhost ... !!!

    (In order to get everything working the "right way", you would need to get help from an AAD domain admin and possibly the network team as well.  A software developer shouldn't need to get this level of involvement for a simple test-service that is being created on our local machine, especially if we are just connecting to it from PBI desktop on the machine).

     

    Basically I was able to get things working by selecting a sub-domain of one of the domains that are registered to us, then I hijacked an app registration with an existing URL-APP-ID based on that sub-domain,  then I created a self-signed cert for my website based on that sub-domain and I changed my hosts file so that my local machine could impersonate the original host . 

     

    After a couple hours of muddling around, I finally got things working.  But some of these steps make a developer feel pretty dirty - especially borrowing a registration, creating a self-cert and impersonating another host.  I also needed to install the full IIS for development, rather than using IIS express...