title: Power BI Embedded : Get Report details API responds with 400 Bad request
body: <p><strong>Summary</strong> : I am working on embedding Power BI reports in a ISV application and when i try to call api endpoint to get embedding details of the report it responds with 400 Bad Request . I am directly calling Power BI APIs without use of SDK as microsoft hasn't officially released PowerBI SDK for Java based application . Also , for debugging I used another .net application which uses PowerBI SDK to make the same API call against same workspace and it works without issues.</p>
  
  <p>All other API endpoints like 'list all workspaces','get workspace details',' list all dashboards' in a workspace ' and even 'list all reports in workspace' respond as requested without issues, but the API endpoint listed here :</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/mt784668.aspx" rel="nofollow noreferrer">Power BI get report embedding details using 'workspace_id' and 'report_id'</a></p>
  
  <p>responds with 400 Bad request with seemingly right credentials and request.</p>
  
  <p><strong>Interfacing Application Context :</strong></p>
  
  <ol>
  <li>The ISV application is built on Spring boot framework(Java) and Angular 2 framework .</li>
  <li>Currently,I couldn't find official Microsoft Power BI SDK for Java based application , because of which i am directly referencing APIs from the <a href="https://msdn.microsoft.com/en-us/library/mt147898.aspx" rel="nofollow noreferrer">Power BI API reference doc</a></li>
  <li>ISV application has all necessary permissions to access the APIs listed here  : 
  <a href="https://docs.microsoft.com/en-us/power-bi/developer/power-bi-permissions" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/power-bi/developer/power-bi-permissions</a></li>
  <li>The application is able to generate token,make authenticated request and get response from power bi for all other api endpoints which are used in the application .</li>
  </ol>
  
  <p><strong>Issue and Debugging</strong></p>
  
  <p>Debugging : </p>
  
  <ol>
  <li>This is the request that PowerBI .NET SDK makes and which works against get report API :</li>
  </ol>
  
  <p>GET <a href="https://api.powerbi.com/v1.0/myorg/groups/d864b33b-74dd-4683-9cfd-91c712039147/reports/d618f04d-0b9d-483b-8f9c-cb1210d14595" rel="nofollow noreferrer">https://api.powerbi.com/v1.0/myorg/groups/d864b33b-74dd-4683-9cfd-91c712039147/reports/d618f04d-0b9d-483b-8f9c-cb1210d14595</a> HTTP/1.1</p>
  
  <p>Authorization: Bearer auth-token</p>
  
  <p>User-Agent: FxVersion/4.7.2117.0 Windows_7_Enterprise/6.1.7601 Microsoft.PowerBI.Api.V2.PowerBIClient/2.0.2.17225</p>
  
  <p>Host: api.powerbi.com</p>
  
  <ol start="2">
  <li>This is the request that my application makes directly referencing API endpoint which returns 400 :</li>
  </ol>
  
  <p>GET <a href="https://api.powerbi.com/v1.0/myorg/groups/d864b33b-74dd-4683-9cfd-91c712039147/reports/d618f04d-0b9d-483b-8f9c-cb1210d14595" rel="nofollow noreferrer">https://api.powerbi.com/v1.0/myorg/groups/d864b33b-74dd-4683-9cfd-91c712039147/reports/d618f04d-0b9d-483b-8f9c-cb1210d14595</a> HTTP/1.1</p>
  
  <p>cache-control: no-cache</p>
  
  <p>Postman-Token: some-token</p>
  
  <p>Authorization: Bearer auth-token</p>
  
  <p>User-Agent: PostmanRuntime/7.1.1</p>
  
  <p>Accept: <em>/</em></p>
  
  <p>Host: api.powerbi.com</p>