Forum Discussion

TriptiSodales's avatar
TriptiSodales
Frequent Visitor
1 year ago

Configuration for OAuth 2.0 Cloud Foundry with Power BI

Hello,

      I am trying to connect power BI by O Auth feed as well web option for importing data from CLOUD FOUNDRY (SAP) . also created application in BTP. I got error while creating connection by using OAuth feed  and WEB  options. Can anyone suggest  me steps to create connection ?

#SAP #CloudFoundry #OAuth2.0 #OAuth #web

 

14 Replies

  • jaineshp's avatar
    jaineshp
    Icon for Memorable Member rankMemorable Member

    Hey TriptiSodales,

    Looking at your Power BI to Cloud Foundry OAuth connection issue, here are the key steps to resolve this:

    Prerequisites:

    • Ensure your BTP application has proper OAuth client credentials
    • Verify the OAuth scopes include necessary permissions for data access
    • Check that redirect URIs are correctly configured in BTP

    Power BI OAuth Setup:

    1. In Power BI, go to Get Data > Web > Advanced
    2. Use your Cloud Foundry API endpoint URL
    3. Select OAuth2 authentication
    4. Enter your BTP application's:
      • Client ID
      • Client Secret
      • Authorization URL (typically: https://[subdomain].authentication.[region].hana.ondemand.com/oauth/authorize)
      • Token URL (typically: https://[subdomain].authentication.[region].hana.ondemand.com/oauth/token)

    Common Issues & Fixes:

    • CORS errors: Add Power BI domain to allowed origins in BTP
    • Token expiry: Set appropriate token refresh intervals
    • Scope permissions: Ensure OAuth scope includes data read permissions
    • SSL/TLS: Verify certificate configurations match

    Alternative Web Approach: If OAuth fails, try using Web connector with:

    • Basic authentication using service key credentials
    • Direct API endpoints with proper headers

    Additional Step: Test your OAuth flow first using Postman or similar tool to verify credentials work outside Power BI.

    What specific error message are you seeing? That would help narrow down the exact issue.

    Fixed? ✓ Mark it • Share it • Help others!


    Best Regards,
    Jainesh Poojara | Power BI Developer

     

  • TriptiSodales's avatar
    TriptiSodales
    Frequent Visitor

    In power BI setup , there is no OAuth2 authentication option

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi TriptiSodales,

      Thanks for the update.
      In Power BI, the Web connector doesn’t show OAuth2 as a direct option. If your SAP Cloud Foundry login is linked with Azure AD or SAP IAS, you can try the “Organizational account” option.

      Another way is to first get an OAuth2 access token outside Power BI for example, in Postman using your BTP app’s Client ID, Client Secret, and token URL. Then, in Power BI, go to Get Data → Web, choose Web API, and add the token in the header like:
      Authorization: Bearer <your_token>

      go through with the below document hope it may resolve your Issue:
      https://learn.microsoft.com/en-us/power-platform/sap/connect/entra-id-apim-oauth
      https://learn.microsoft.com/en-us/power-query/connectors/web/web

      Hope this helps if you have any queries we are  happy to assist you further.
      Regards,
      Community support Team.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi TriptiSodales,
        I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.

        Regards,
        Harshitha.