<?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: How to generate authorization token in R? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/462445#M14232</link>
    <description>&lt;P&gt;Hi Dale&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;I've tried with your addition. But error persists. See it below:&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="browser error" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/106619i24772BC2C667ACD4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="r error auth.PNG" alt="browser error" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;browser error&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruslan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 14 Jul 2018 19:40:58 GMT</pubDate>
    <dc:creator>zoloturu</dc:creator>
    <dc:date>2018-07-14T19:40:58Z</dc:date>
    <item>
      <title>How to generate authorization token in R?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/457137#M14074</link>
      <description>&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to generate an authorization token to Power BI Service in R.&amp;nbsp;Thanks to Tom Martens there is his experience mentioned in this topic -&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/Service/connect-to-Power-BI-Service-using-R/m-p/119697#M18632" target="_self"&gt;https://community.powerbi.com/t5/Service/connect-to-Power-BI-Service-using-R/m-p/119697#M18632&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I tried, it was unsuccessful.&amp;nbsp;Can somebody help to find out what is wrong in below R script?&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;library("httr");
library("httpuv")

# 
#oauth_endpoints("azure")
powerbi.urls &amp;lt;- oauth_endpoint(  
  "authorize",  
  "token",
  base_url = "https://login.windows.net/common/oauth2")

powerbi.app &amp;lt;- oauth_app(
  "myAppName",
  key="my_client_id-value", 
  secret="my_secret_id-value"
)

powerbi.token &amp;lt;- oauth2.0_token(powerbi.urls, powerbi.app,
                                user_params = list(resource = "https://analysis.windows.net/powerbi/api"),
                                use_oob = FALSE)&lt;/FONT&gt;&lt;/PRE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruslan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 20:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/457137#M14074</guid>
      <dc:creator>zoloturu</dc:creator>
      <dc:date>2018-07-07T20:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate authorization token in R?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/458273#M14113</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Ruslan,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What's the error message?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I added a parameter to "&lt;/SPAN&gt;&lt;FONT size="2"&gt;oauth_endpoint". It worked. Please give it a try.&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;library("httr");
library("httpuv")

# 
#oauth_endpoints("azure")
powerbi.urls &amp;lt;- oauth_endpoint(&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;  NULL,&lt;/FONT&gt;&lt;/STRONG&gt;
  "authorize",  
  "token",
  base_url = "https://login.windows.net/common/oauth2")

powerbi.app &amp;lt;- oauth_app(
  "myAppName",
  key="my_client_id-value", 
  secret="my_secret_id-value"
)

powerbi.token &amp;lt;- oauth2.0_token(powerbi.urls, powerbi.app,
                                user_params = list(resource = "https://analysis.windows.net/powerbi/api"),
                                use_oob = FALSE)&lt;/PRE&gt;
&lt;P&gt;&lt;A href="https://ibb.co/nbyUro" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/be204d7037a015607808843b7a5f0ef86a63bf51/68747470733a2f2f696d6167652e6962622e636f2f63784746576f2f486f775f746f5f67656e65726174655f617574686f72697a6174696f6e5f746f6b656e5f696e5f522e706e67" border="0" alt="How_to_generate_authorization_token_in_R" /&gt;&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, 10 Jul 2018 03:06:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/458273#M14113</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-07-10T03:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate authorization token in R?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/462445#M14232</link>
      <description>&lt;P&gt;Hi Dale&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;I've tried with your addition. But error persists. See it below:&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="browser error" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/106619i24772BC2C667ACD4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="r error auth.PNG" alt="browser error" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;browser error&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ruslan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jul 2018 19:40:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/462445#M14232</guid>
      <dc:creator>zoloturu</dc:creator>
      <dc:date>2018-07-14T19:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate authorization token in R?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/462634#M14237</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Ruslan,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As we can see from the error message, it seem the redirect URL isn't the same between your settings and the Azure settings. Please refer to the snapshot below and check out.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://ibb.co/dXYRYd" target="_blank"&gt;&lt;IMG src="https://ip1.i.lithium.com/b4dede5510896e8a9bad332596d484aa4b6655b9/68747470733a2f2f696d6167652e6962622e636f2f656647504b4a2f486f775f746f5f67656e65726174655f617574686f72697a6174696f6e5f746f6b656e5f696e5f52322e706e67" border="0" alt="How_to_generate_authorization_token_in_R2" /&gt;&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>Mon, 16 Jul 2018 01:25:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/462634#M14237</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-07-16T01:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate authorization token in R?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/468683#M14394</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/52035"&gt;@zoloturu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please mark the proper answer as a solution?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Dale&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 13:35:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/468683#M14394</guid>
      <dc:creator>v-jiascu-msft</dc:creator>
      <dc:date>2018-07-22T13:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate authorization token in R?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/468689#M14395</link>
      <description>&lt;P&gt;Hi Dale&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;I didn't receive any solution so far. I tried to add localhost in Azure portal to app registrations as you told, but it didn't help. I opened a MS ticket for that. You can check it with number&amp;nbsp;&lt;SPAN&gt;118071418582124.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ruslan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jul 2018 14:15:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-generate-authorization-token-in-R/m-p/468689#M14395</guid>
      <dc:creator>zoloturu</dc:creator>
      <dc:date>2018-07-22T14:15:39Z</dc:date>
    </item>
  </channel>
</rss>

