Forum Discussion

gilmore_staci's avatar
gilmore_staci
Icon for Helper II rankHelper II
2 months ago
Solved

Salesforce to Power BI api connection using .force or .site URLs

Our community users login with a .my.site.com url.  They have API enabled but trying to connect to Power BI is an issue.  Has anyone done this successfully?

  • Hi gilmore_staci ,

     

    I would separate two issues here.

     

    For the connection, I would avoid using the Experience Cloud site URL as the Salesforce endpoint in Power BI. The native connector is usually better with the Salesforce org My Domain, for example: https://yourdomain.my.salesforce.com

    Then authenticate with a dedicated integration user that has API Enabled and only the permissions required for reporting.

     

    The private case comments issue is more important. If those comments appear in Power BI, the integration user may have access to them in Salesforce, or the query may be pulling CaseComment data too broadly. I would check whether that user can see the same comments directly in Salesforce, then restrict the profile, permission set, fields, objects, or filters before importing the data.

     

    Another option is to use a Salesforce-side connector such as Power BI Connector for Salesforce by Metrica Software:
    https://appexchange.salesforce.com/appxListingDetail?listingId=31526f0e-abd8-4cb5-bd1a-3bd56b5c0577

    It lets you create a prepared Salesforce data source first, select only the needed objects and fields, apply filters, and then connect Power BI to that controlled dataset. That can help keep sensitive support data out of the export when permissions and filters are configured correctly.

     

    Docs and support:
    https://metricasoftware.com/docs/salesforce/
    https://metricasoftware.com/docs/salesforce/contact-support/

     

    Happy to show how we would structure a safer Cases and Case Comments export.

     

    Cheers,

    Metrica Team

7 Replies

  • Hello gilmore_staci 

     

    Create a dedicated integration user (full Salesforce or Salesforce Integration license) with API Enabled and access to the records you need.
    In Power BI: Get Data β†’ Salesforce Objects β†’ choose Custom β†’ enter your My Domain (https://yourdomain.my.salesforce.com).
    Authenticate as that integration user via OAuth.

     


    If my response helped you, please consider clicking
    Accept as Solution βœ… and giving it a Like πŸ‘ – it helps others in the community too.

    Thanks,

    Connect with me on:
    LinkedIn |
    Data With Pankaj - YouTube
    • v-aatheeque's avatar
      v-aatheeque
      Icon for Community Support rankCommunity Support

      Hi gilmore_staci 

      Thanks for the additional details. To better understand whether this is related to the Power BI connector or the Salesforce security configuration, could you clarify a couple of points:

       

      • Are you seeing any error messages in Power BI, or is the issue simply that private case comments are being returned in the imported data?
      • When you log in directly to Salesforce using the same integration user, do you also see those private case comments there?
      • v-aatheeque's avatar
        v-aatheeque
        Icon for Community Support rankCommunity Support

        Hi gilmore_staci 

        We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.

  • Hi gilmore_staci ,

     

    I would separate two issues here.

     

    For the connection, I would avoid using the Experience Cloud site URL as the Salesforce endpoint in Power BI. The native connector is usually better with the Salesforce org My Domain, for example: https://yourdomain.my.salesforce.com

    Then authenticate with a dedicated integration user that has API Enabled and only the permissions required for reporting.

     

    The private case comments issue is more important. If those comments appear in Power BI, the integration user may have access to them in Salesforce, or the query may be pulling CaseComment data too broadly. I would check whether that user can see the same comments directly in Salesforce, then restrict the profile, permission set, fields, objects, or filters before importing the data.

     

    Another option is to use a Salesforce-side connector such as Power BI Connector for Salesforce by Metrica Software:
    https://appexchange.salesforce.com/appxListingDetail?listingId=31526f0e-abd8-4cb5-bd1a-3bd56b5c0577

    It lets you create a prepared Salesforce data source first, select only the needed objects and fields, apply filters, and then connect Power BI to that controlled dataset. That can help keep sensitive support data out of the export when permissions and filters are configured correctly.

     

    Docs and support:
    https://metricasoftware.com/docs/salesforce/
    https://metricasoftware.com/docs/salesforce/contact-support/

     

    Happy to show how we would structure a safer Cases and Case Comments export.

     

    Cheers,

    Metrica Team

    • gilmore_staci's avatar
      gilmore_staci
      Icon for Helper II rankHelper II

      Unfortuntely when using the internal integration user, there is no way to edit Internal Comments on the profile, its greyed out.   I've already asked Salesforce if they can make this editable and they said no.  I guess a connector is the only way we are going to get around this till power bi supports the community urls which allows for better security

       

      • metrica's avatar
        metrica
        Icon for Post Prodigy rankPost Prodigy

        Hi gilmore_staci,

         

        That matches how the platform works, unfortunately. The Public/Private flag on case comments only controls what Experience Cloud (portal) users see - internal users with read access to a case always see all of its comments, since CaseComment visibility follows Case access. Even if that checkbox were editable, it wouldn't stop CaseComment from being queried through the API.

         

        It also means the restriction has to live in Salesforce, not in Power BI: a Power Query filter sits on the client side, anyone who can edit the dataset can remove it, and the same integration user credentials expose all comments from any other API client.

         

        With our connector the setup would be: create a data source with Case and only the fields you report on, and leave CaseComment out - that way private comments never leave Salesforce, and only your admins control what the data source contains. There's a free trial on AppExchange, docs here: https://metricasoftware.com/docs/salesforce/.

         

        Happy to jump on a short call to set up the Cases export together - and if you do need public comments in your reports, we'll find the cleanest way to bring those in safely: https://metricasoftware.com/docs/salesforce/contact-support/ (mention this thread).

         

        And agreed on Experience Cloud URLs - per Microsoft's docs the native connector only accepts salesforce.com and cloudforce.com domains (https://learn.microsoft.com/en-us/power-query/connectors/salesforce-objects), so until that changes, filtering on the Salesforce side is the practical route.

        Cheers,
        Metrica Team