Forum Discussion
robert_karen
11 years agoNew Member
having trouble getting oauth2 token from azure w/ java
Hi, I am new to developing BI apps and am stuck trying to get authentication for a web server app via azure. I am getting an authentication code, but when I try to request an authentication toke...
robert_karen
11 years agoNew Member
to be clear the authorization token I am trying to get is for Azure AD. Thanks.
- Greg_Deckler11 years agoCommunity Champion
http://www.cloudidentity.com/blog/2013/07/23/securing-a-web-api-with-windows-azure-ad-and-katana/
ClaimsPrincipal cp = ClaimsPrincipal.Current; ClaimsIdentity ci = cp.Identity as ClaimsIdentity; BootstrapContext bc = ci.BootstrapContext as BootstrapContext; SecurityToken securityToken = bc.SecurityToken;
You also need to set the saveBootstrapContext attribute in your config file:
<system.identityModel> <identityConfiguration saveBootstrapContext="true"> ... </system.identityModel>- robert_karen11 years agoNew Member
Thanks, but these don't address my question. I am trying to use a simple Java program to get authorization
token from Azure AD in order to use Power BI RESt api. I am having trouble as I described above. Thanks again.
- curth11 years agoPower BI Team
Have you looked at the body of the 400 response to see if there's any additional information?