<?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: load arcgis online data into Power BI using OAuth2 in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/load-arcgis-online-data-into-power-bi-using-oauth2/m-p/1245647#M49637</link>
    <description>&lt;P&gt;All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am attempting to create a query in PowerBI using this code. I replaced Client_ID, Client_Secret, fsURL and the token request.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;let
//Custom Variables
client_id = "xxxx",
client_secret = "xxxx",
fsURL = https://services5.arcgis.com/12345678990/ArcGIS/rest/services/ServiceName/FeatureServer/0/,
whereClause = "objectid&amp;gt;0",
fieldsOut = "*",
tokenrequest = https://www.arcgis.com/sharing/rest/oauth2/token/?client_id=&amp;amp; client_id &amp;amp; "&amp;amp;client_secret="&amp;amp; client_secret &amp;amp; "&amp;amp;grant_type=client_credentials",

//Get Data

Token_auto = Json.Document(Web.Contents(tokenrequest), 65001),
#"TokenTable" = Record.ToTable(Token_auto),
token = TokenTable{0}[Value],

Source = Json.Document(Web.Contents(fsURL &amp;amp; "query?where=" &amp;amp; whereClause &amp;amp; "&amp;amp;outFields=" &amp;amp; fieldsOut &amp;amp; "&amp;amp;returnGeometry=false&amp;amp;f=pjson&amp;amp;token=" &amp;amp; token), 65001),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{7}[Value],
#"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"attributes"}, {"attributes"}),
#"Expanded attributes" = Table.ExpandRecordColumn(#"Expanded Column1", "attributes", {"OBJECTID", "Trace_Catchment_Name", "GlobalID", "Site", "Type", "Shape__Area", "Shape__Length", "Population"}, {"OBJECTID", "Trace_Catchment_Name", "GlobalID", "Site", "Type", "Shape__Area", "Shape__Length", "Population"})
in
#"Expanded attributes"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am running into this error. Does anyone know a possible solution?&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aishak12_1-1672936301628.png"&gt;&lt;img src="https://community.esri.com/skins/images/2BF164F1884F7701FF2B8AADC9EDADFC/responsive_peak/images/image_not_found.png" alt="aishak12_1-1672936301628.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jan 2023 16:32:42 GMT</pubDate>
    <dc:creator>AdamIshak</dc:creator>
    <dc:date>2023-01-05T16:32:42Z</dc:date>
    <item>
      <title>load arcgis online data into Power BI using OAuth2</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/load-arcgis-online-data-into-power-bi-using-oauth2/m-p/1245646#M49636</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am attempting to create a query in PowerBI using this code. I replaced Client_ID, Client_Secret, fsURL and the token request.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;let
//Custom Variables
client_id = "xxxx",
client_secret = "xxxx",
fsURL = https://services5.arcgis.com/12345678990/ArcGIS/rest/services/ServiceName/FeatureServer/0/,
whereClause = "objectid&amp;gt;0",
fieldsOut = "*",
tokenrequest = https://www.arcgis.com/sharing/rest/oauth2/token/?client_id=&amp;amp; client_id &amp;amp; "&amp;amp;client_secret="&amp;amp; client_secret &amp;amp; "&amp;amp;grant_type=client_credentials",

//Get Data

Token_auto = Json.Document(Web.Contents(tokenrequest), 65001),
#"TokenTable" = Record.ToTable(Token_auto),
token = TokenTable{0}[Value],

Source = Json.Document(Web.Contents(fsURL &amp;amp; "query?where=" &amp;amp; whereClause &amp;amp; "&amp;amp;outFields=" &amp;amp; fieldsOut &amp;amp; "&amp;amp;returnGeometry=false&amp;amp;f=pjson&amp;amp;token=" &amp;amp; token), 65001),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{7}[Value],
#"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"attributes"}, {"attributes"}),
#"Expanded attributes" = Table.ExpandRecordColumn(#"Expanded Column1", "attributes", {"OBJECTID", "Trace_Catchment_Name", "GlobalID", "Site", "Type", "Shape__Area", "Shape__Length", "Population"}, {"OBJECTID", "Trace_Catchment_Name", "GlobalID", "Site", "Type", "Shape__Area", "Shape__Length", "Population"})
in
#"Expanded attributes"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am running into this error. Does anyone know a possible solution?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AdamIshak_0-1672935991903.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/59796i8A9D63296E6A3968/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AdamIshak_0-1672935991903.png" alt="AdamIshak_0-1672935991903.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 16:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/load-arcgis-online-data-into-power-bi-using-oauth2/m-p/1245646#M49636</guid>
      <dc:creator>AdamIshak</dc:creator>
      <dc:date>2023-01-05T16:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: load arcgis online data into Power BI using OAuth2</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/load-arcgis-online-data-into-power-bi-using-oauth2/m-p/1245647#M49637</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am attempting to create a query in PowerBI using this code. I replaced Client_ID, Client_Secret, fsURL and the token request.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;let
//Custom Variables
client_id = "xxxx",
client_secret = "xxxx",
fsURL = https://services5.arcgis.com/12345678990/ArcGIS/rest/services/ServiceName/FeatureServer/0/,
whereClause = "objectid&amp;gt;0",
fieldsOut = "*",
tokenrequest = https://www.arcgis.com/sharing/rest/oauth2/token/?client_id=&amp;amp; client_id &amp;amp; "&amp;amp;client_secret="&amp;amp; client_secret &amp;amp; "&amp;amp;grant_type=client_credentials",

//Get Data

Token_auto = Json.Document(Web.Contents(tokenrequest), 65001),
#"TokenTable" = Record.ToTable(Token_auto),
token = TokenTable{0}[Value],

Source = Json.Document(Web.Contents(fsURL &amp;amp; "query?where=" &amp;amp; whereClause &amp;amp; "&amp;amp;outFields=" &amp;amp; fieldsOut &amp;amp; "&amp;amp;returnGeometry=false&amp;amp;f=pjson&amp;amp;token=" &amp;amp; token), 65001),
#"Converted to Table" = Record.ToTable(Source),
Value = #"Converted to Table"{7}[Value],
#"Converted to Table1" = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table1", "Column1", {"attributes"}, {"attributes"}),
#"Expanded attributes" = Table.ExpandRecordColumn(#"Expanded Column1", "attributes", {"OBJECTID", "Trace_Catchment_Name", "GlobalID", "Site", "Type", "Shape__Area", "Shape__Length", "Population"}, {"OBJECTID", "Trace_Catchment_Name", "GlobalID", "Site", "Type", "Shape__Area", "Shape__Length", "Population"})
in
#"Expanded attributes"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I am running into this error. Does anyone know a possible solution?&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="aishak12_1-1672936301628.png"&gt;&lt;img src="https://community.esri.com/skins/images/2BF164F1884F7701FF2B8AADC9EDADFC/responsive_peak/images/image_not_found.png" alt="aishak12_1-1672936301628.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 16:32:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/load-arcgis-online-data-into-power-bi-using-oauth2/m-p/1245647#M49637</guid>
      <dc:creator>AdamIshak</dc:creator>
      <dc:date>2023-01-05T16:32:42Z</dc:date>
    </item>
  </channel>
</rss>

