<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issues Embedding Report in Salesforce in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/463807#M14260</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding to issue A:&lt;/P&gt;
&lt;P&gt;1. The client info, like client id and client secret, is surely stable. So you can hard-code them. Did you get error message that the client info is invalid?&lt;/P&gt;
&lt;P&gt;2. Did you upload all the things in the guide post?&lt;/P&gt;
&lt;P&gt;Regarding to issue B:&lt;/P&gt;
&lt;P&gt;Can you provide more info? Or I would suggest you open a support ticket &lt;A href="https://powerbi.microsoft.com/en-us/support/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Dale&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jul 2018 05:50:55 GMT</pubDate>
    <dc:creator>v-jiascu-msft</dc:creator>
    <dc:date>2018-07-17T05:50:55Z</dc:date>
    <item>
      <title>Issues Embedding Report in Salesforce</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/462119#M14224</link>
      <description>&lt;P&gt;Objective: Embed PowerBI report in Salesforce&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Issues: API Authentication/Stale token stored in Salesforce&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had followed the blog post on how embedding within Salesforce found here:&amp;nbsp;&lt;A href="https://powerbi.microsoft.com/en-us/blog/embedding-a-power-bi-report-into-salesforce/" target="_blank"&gt;https://powerbi.microsoft.com/en-us/blog/embedding-a-power-bi-report-into-salesforce/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And was ultimately successful in getting the page to render in Salesforce, but only after hard coding values like client_id and client_secret in the Apex Classes (there was an error in my definition of the Custom Setting that caused accessing the values to fail).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While reconstructing the provided code, one of the trouble shooting steps I took ultimately broke the embedding.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, there are two problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A. The authentication token stored in Salesforce after hard-coding the client info is no longer valid (I recreated the app in AAD as another trouble shooting step)&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Despite attempts to invoke the token grant process to create a new token, I was never able to successfully overwrite the one stored&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Now I get a 403 Forbidden error in the console logs when trying to load the VisualForce page&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B. In trying to learn more about the API through testing with Postman (based on this post: &lt;A href="https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310054" target="_blank"&gt;https://community.powerbi.com/t5/Developer/Power-BI-REST-API-using-postman-generate-embed-token/m-p/310054&lt;/A&gt; ), I've been recieving errors initially of the form:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error": "invalid_grant",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error_description": "AADSTS70002: Error validating credentials. AADSTS50126:&amp;nbsp;Invalid username or password&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error_codes": [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 70002,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50126&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And now:&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error": "unauthorized_client",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error_description": "AADSTS70002: Error validating credentials. AADSTS50053: You've tried to sign in too many times with an incorrect user ID or password.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "error_codes": [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 70002,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50053&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Despite being the correct credentials.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated and I'm happy to provide more detail if necessary.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jul 2018 20:22:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/462119#M14224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-13T20:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Embedding Report in Salesforce</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/463807#M14260</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding to issue A:&lt;/P&gt;
&lt;P&gt;1. The client info, like client id and client secret, is surely stable. So you can hard-code them. Did you get error message that the client info is invalid?&lt;/P&gt;
&lt;P&gt;2. Did you upload all the things in the guide post?&lt;/P&gt;
&lt;P&gt;Regarding to issue B:&lt;/P&gt;
&lt;P&gt;Can you provide more info? Or I would suggest you open a support ticket &lt;A href="https://powerbi.microsoft.com/en-us/support/" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: 'Segoe UI'; font-size: 10.5pt; color: #333333;"&gt;Dale&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 05:50:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/463807#M14260</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-07-17T05:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Embedding Report in Salesforce</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/464580#M14285</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/28904"&gt;@v-jiascu-msft&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back to me!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I was able to successfully embed the report when the values were hard coded. This led me to believe the values in the Custom Setting were wrong so I deleted the Custom Setting and the App in AAD and recreated both, however, the issue ended up being that I named the Custom Setting&amp;nbsp; 'PowerBI' instead of PowerBI.&amp;nbsp; Now that the Custom Setting is named properly, Salesforce can access client_id, client_secret, etc, but the AccessToken and RefreshToken that are stored are for a different App so the authentication fails. I've been unable to overwrite the AccessToken and RefreshToken stored by Salesforce despite&amp;nbsp;attempts to re-initiate the login process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Research into how&amp;nbsp; to overwrite OAuth tokens in Salesforce hasn't been fruitful so I'm hoping someone who understands the authenication process better might have&amp;nbsp;some insight.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I have followed all of the steps in the guide. After the hard coded version worked I made sure all of the necessary parts exist within Salesforce and are named correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for B, I'll look into a support ticket for now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 16:36:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/464580#M14285</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-17T16:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Embedding Report in Salesforce</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/466865#M14349</link>
      <description>&lt;P&gt;Background information: The report is located in a Premium capacity workspace and the hope is to distribute the report to the Sales team without needing to grant licenses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some additional information about the steps I took:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Register App with Azure AD using onboarding tool:&amp;nbsp;&lt;A href="https://app.powerbi.com/embedsetup/userownsdata" target="_blank"&gt;https://app.powerbi.com/embedsetup/userownsdat&lt;/A&gt;a (This step wasn’t done as the service account, not sure of the implications of that)&lt;/LI&gt;&lt;LI&gt;Grant permissions in AAD as Service Account&amp;nbsp;(master account, admin of workspace)&lt;/LI&gt;&lt;LI&gt;Create Salesforce Custom Setting OAuthApp_pbi&lt;/LI&gt;&lt;LI&gt;Populate Custom Setting for PowerBI with AAD endpoints along with client id/secret&lt;/LI&gt;&lt;LI&gt;Create OAuthController and PowerBIController Apex Classes with code from:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/Microsoft/BusinessPlatformApps/tree/dev/Samples/Salesforce/EmbedPowerBIReport" target="_blank"&gt;https://github.com/Microsoft/BusinessPlatformApps/tree/dev/Samples/Salesforce/EmbedPowerBIReport&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Add Azure AD to Salesforce’s Remote Site Settings&lt;/LI&gt;&lt;LI&gt;Create Visualforce Page with code from GitHub repo linked above&lt;/LI&gt;&lt;LI&gt;Add Report ID to Visualforce page code&lt;/LI&gt;&lt;LI&gt;Navigate to Visualforce page located at:&amp;nbsp; OurSalesforceInstance&lt;A href="https://greenbrier--magicmover--c.cs54.visual.force.com/apex/PowerBI" target="_blank"&gt;.com/apex/PowerBI&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;In pop up window, log in as&amp;nbsp;the Service Account&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once all of these steps have been completed the iframe renders within Salesforce, but displays "This content is not available". Based on this blog post ( &lt;A href="https://www.linkedin.com/pulse/success-power-bi-embedded-salesforce-fred-kaffenberger/" target="_blank"&gt;https://www.linkedin.com/pulse/success-power-bi-embedded-salesforce-fred-kaffenberger/&lt;/A&gt; ) my next debugging step would be to use Fiddler to inspect the requests/replies. I'll work on that, but hopefully this additional information might point out where I went wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any ideas.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 16:39:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/466865#M14349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-19T16:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issues Embedding Report in Salesforce</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/3989751#M53370</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;were you able to find a solution? As a workaround, maybe you can try to test your connection with a 3rd party connector.&amp;nbsp;I've tried&amp;nbsp;windsor.ai, supermetrics and funnel.io. I stayed with windsor because it is much cheaper so just to let you know other options.&amp;nbsp;In case you wonder,&amp;nbsp;to make the connection&amp;nbsp;first&amp;nbsp;search for the Salesforce connector in the data sources list:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SALESFORCE-1.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/971396iBA57BCDAFABFCEF0/image-size/large?v=v2&amp;amp;px=999" role="button" title="SALESFORCE-1.png" alt="SALESFORCE-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that, just grant access to your Salesforce account using your credentials, then on&amp;nbsp;&lt;STRONG&gt;preview and destination&lt;/STRONG&gt;&amp;nbsp;page you will see a preview of your Salesforce fields:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SALESFORCE-2.png" style="width: 998px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/971410i39742989B41E2398/image-size/large?v=v2&amp;amp;px=999" role="button" title="SALESFORCE-2.png" alt="SALESFORCE-2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There just select the fields you need. It is also compatible with custom fields and custom objects, so you'll be able to export them through windsor.&amp;nbsp; Finally, just select PBI as your data destination and finally just copy and paste the url on&amp;nbsp;&lt;STRONG&gt;PBI --&amp;gt; Get Data --&amp;gt; Web --&amp;gt; Paste the url.&lt;/STRONG&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SELECT_DESTINATION_NEW.png" style="width: 998px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/971408i8D39ED227EC46EA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="SELECT_DESTINATION_NEW.png" alt="SELECT_DESTINATION_NEW.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 00:35:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Issues-Embedding-Report-in-Salesforce/m-p/3989751#M53370</guid>
      <dc:creator>QueryWhiz</dc:creator>
      <dc:date>2024-06-13T00:35:40Z</dc:date>
    </item>
  </channel>
</rss>

