<?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 Can you pass parameters to an add-in via an arcgis-pro:// URI? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1239050#M9155</link>
    <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;The AGOL/Portal OAuth window redirects you back to Pro using a URI kind of like this:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="andale mono,times"&gt;&lt;A href="arcgis-pro://auth/4428/" target="_blank" rel="noopener noreferrer"&gt;arcgis-pro://auth/4428/&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;Is there any way to use a similar URI to handle custom actions within an ArcGIS Pro add-in?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Two adjacent use cases I am trying to tackle:&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;Add-in authentication via a web service pretty much exactly how AGOL does it: click button on the add-in, a browser window opens, you enter your credentials, and you're redirected back to Pro with an auth token that the add-in can access.&lt;/LI&gt;&lt;LI&gt;Sharing custom scenarios amongst users via URI schemes. For example, you have the add-in configured in a specific way and it has an item open. You want to message me this exact scenario for me to review. You send me a URI like this and Pro passes this data to my add-in:&amp;nbsp;&lt;FONT face="andale mono,times"&gt;&lt;A href="arcgis-pro://auth/4428/" target="_blank" rel="noopener noreferrer"&gt;arcgis-pro://custom_add_in_name/?&amp;lt;scenario_data_goes_here&amp;gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Dec 2022 08:36:08 GMT</pubDate>
    <dc:creator>MikeDavlantes</dc:creator>
    <dc:date>2022-12-08T08:36:08Z</dc:date>
    <item>
      <title>Can you pass parameters to an add-in via an arcgis-pro:// URI?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1239050#M9155</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;The AGOL/Portal OAuth window redirects you back to Pro using a URI kind of like this:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="andale mono,times"&gt;&lt;A href="arcgis-pro://auth/4428/" target="_blank" rel="noopener noreferrer"&gt;arcgis-pro://auth/4428/&lt;/A&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;Is there any way to use a similar URI to handle custom actions within an ArcGIS Pro add-in?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Two adjacent use cases I am trying to tackle:&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;Add-in authentication via a web service pretty much exactly how AGOL does it: click button on the add-in, a browser window opens, you enter your credentials, and you're redirected back to Pro with an auth token that the add-in can access.&lt;/LI&gt;&lt;LI&gt;Sharing custom scenarios amongst users via URI schemes. For example, you have the add-in configured in a specific way and it has an item open. You want to message me this exact scenario for me to review. You send me a URI like this and Pro passes this data to my add-in:&amp;nbsp;&lt;FONT face="andale mono,times"&gt;&lt;A href="arcgis-pro://auth/4428/" target="_blank" rel="noopener noreferrer"&gt;arcgis-pro://custom_add_in_name/?&amp;lt;scenario_data_goes_here&amp;gt;&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Dec 2022 08:36:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1239050#M9155</guid>
      <dc:creator>MikeDavlantes</dc:creator>
      <dc:date>2022-12-08T08:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can you pass parameters to an add-in via an arcgis-pro:// URI?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1240064#M9165</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;For first case I use scenario like in code below:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;                var psi = new ProcessStartInfo
                {
                    FileName = loginUrl,
                    UseShellExecute = true
                };

                // Open the browser.
                Process proc = Process.Start(psi);
                if (proc != null)
                {
                    // Wait For Login logic using HttpListenerContext
				....
                    // Get Tokens logic using HttpPost
				....
                }&lt;/LI-CODE&gt;&lt;P&gt;Waiting for login or getting tokens are system dependent tasks. So I can suggest only c# classes to use in those tasks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2022 09:44:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1240064#M9165</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-12-12T09:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can you pass parameters to an add-in via an arcgis-pro:// URI?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241082#M9182</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or you can use the 'built-in' functionality of ArcGIS Pro to create a connection to the portal and then use the ArcGISPortal class to get a token:&amp;nbsp;&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic14671.html" target="_blank"&gt;ArcGISPortal Class—ArcGIS Pro&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can also use&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9050.html" target="_self"&gt;EsriHttpClient Class—ArcGIS Pro&amp;nbsp;&lt;/A&gt;for you rest type calls and you don't need to worry about the token (expiration etc.)&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:09:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241082#M9182</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-12-14T15:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can you pass parameters to an add-in via an arcgis-pro:// URI?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241111#M9184</link>
      <description>&lt;P&gt;Thanks! It makes sense that this would be a system thing and not an Arc thing. I think this will probably solve use case number 1.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241111#M9184</guid>
      <dc:creator>MikeDavlantes</dc:creator>
      <dc:date>2022-12-14T15:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can you pass parameters to an add-in via an arcgis-pro:// URI?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241112#M9185</link>
      <description>&lt;P&gt;Unfortunately I am not connecting to Portal or AGOL, I only used those as examples of how I am hoping to get OAuth to work with my add-in. I will be connecting to our third-party server and running auth through there.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 15:56:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241112#M9185</guid>
      <dc:creator>MikeDavlantes</dc:creator>
      <dc:date>2022-12-14T15:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Can you pass parameters to an add-in via an arcgis-pro:// URI?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241156#M9187</link>
      <description>&lt;P&gt;Back at the DevSummit 2017 an Esri Product Engineer (Tushar, he's no longer with esri) did a sample that pretty much does what you're trying to do in your use case 1.&amp;nbsp; &amp;nbsp;Start at minute 37 of the video:&amp;nbsp;&lt;A href="https://mediaspace.esri.com/media/t/1_2ohu1bn6" target="_blank" rel="noopener"&gt;ArcGIS Pro SDK for .NET: Integration with ArcGIS Online - Esri Videos: GIS, Events, ArcGIS Products &amp;amp; Industries&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I attached the demo source code for your reference.&amp;nbsp; Please note that the code is for ArcGIS Pro 1.4 and about 5 years old.&amp;nbsp; However, it might provide you with some hints on how to possible use EsriHttpClient to accomplish your task.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 16:53:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/can-you-pass-parameters-to-an-add-in-via-an-arcgis/m-p/1241156#M9187</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2022-12-14T16:53:51Z</dc:date>
    </item>
  </channel>
</rss>

