<?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 Authenticating to use organization webmap in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101580#M10468</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am writing a simple WPF application to view a webmap that is only available for my organization. I have had issues finding example code for how to authenticate to be able to do that. I have used the examples I have found, but cannot make it work. Any ideas? This is what I have so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private async Task SetupMap()
{
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ApiKey = "*****";

ArcGISPortal portal = await ArcGISPortal.CreateAsync();

PortalItem mapItem = await PortalItem.CreateAsync(portal, "****");

Map map = new Map(mapItem);

this.Map = map;

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Sep 2021 11:57:32 GMT</pubDate>
    <dc:creator>ThomasMoe</dc:creator>
    <dc:date>2021-09-24T11:57:32Z</dc:date>
    <item>
      <title>Authenticating to use organization webmap</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101580#M10468</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am writing a simple WPF application to view a webmap that is only available for my organization. I have had issues finding example code for how to authenticate to be able to do that. I have used the examples I have found, but cannot make it work. Any ideas? This is what I have so far.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private async Task SetupMap()
{
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ApiKey = "*****";

ArcGISPortal portal = await ArcGISPortal.CreateAsync();

PortalItem mapItem = await PortalItem.CreateAsync(portal, "****");

Map map = new Map(mapItem);

this.Map = map;

}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Sep 2021 11:57:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101580#M10468</guid>
      <dc:creator>ThomasMoe</dc:creator>
      <dc:date>2021-09-24T11:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticating to use organization webmap</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101761#M10472</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hi&amp;nbsp;Thomas,&amp;nbsp;thanks&amp;nbsp;for&amp;nbsp;reaching&amp;nbsp;out.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;We&amp;nbsp;have&amp;nbsp;several&amp;nbsp;samples&amp;nbsp;that&amp;nbsp;use&amp;nbsp;authentication&amp;nbsp;in&amp;nbsp;WPF.&amp;nbsp;You&amp;nbsp;may&amp;nbsp;have&amp;nbsp;already&amp;nbsp;seen&amp;nbsp;our&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/main/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Security/OAuth/OAuth.xaml.cs" target="_blank" rel="noopener"&gt;OAuth&amp;nbsp;sample&lt;/A&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Before&amp;nbsp;creating&amp;nbsp;the ArcGIS Portal, you&amp;nbsp;will&amp;nbsp;need&amp;nbsp;to&amp;nbsp;set&amp;nbsp;the&amp;nbsp;challenge&amp;nbsp;handler&amp;nbsp;for&amp;nbsp;the&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Security.AuthenticationManager.html" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Authentication&amp;nbsp;manager&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;We&amp;nbsp;cover&amp;nbsp;that&amp;nbsp;workflow&amp;nbsp;in&lt;/SPAN&gt;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-dotnet/blob/main/src/WPF/ArcGISRuntime.WPF.Viewer/Helpers/ArcGISLoginPrompt.cs#L88" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;&amp;nbsp;this&amp;nbsp;helper&amp;nbsp;class&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Alternatively,&amp;nbsp;you&amp;nbsp;can&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Portal.ArcGISPortal.CreateAsync.html#Esri_ArcGISRuntime_Portal_ArcGISPortal_CreateAsync_System_Uri_Esri_ArcGISRuntime_Security_Credential_" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;create&amp;nbsp;a&amp;nbsp;portal&amp;nbsp;using&amp;nbsp;a&amp;nbsp;Credential&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&amp;nbsp;This&amp;nbsp;might&amp;nbsp;be&amp;nbsp;useful&amp;nbsp;if&amp;nbsp;you&amp;nbsp;have&amp;nbsp;already&amp;nbsp;handled&amp;nbsp;the&amp;nbsp;user&amp;nbsp;login&amp;nbsp;and&amp;nbsp;have&amp;nbsp;the&amp;nbsp;Credential.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;Just&amp;nbsp;to&amp;nbsp;confirm,&amp;nbsp;are&amp;nbsp;you&amp;nbsp;using&amp;nbsp;ArcGIS&amp;nbsp;Online?&amp;nbsp;Also&amp;nbsp;what&amp;nbsp;type&amp;nbsp;of&amp;nbsp;authentication&amp;nbsp;are&amp;nbsp;you&amp;nbsp;using&amp;nbsp;in&amp;nbsp;your&amp;nbsp;app?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;I&amp;nbsp;hope&amp;nbsp;this&amp;nbsp;helps&amp;nbsp;you&amp;nbsp;fix&amp;nbsp;your&amp;nbsp;issue.&amp;nbsp;Please&amp;nbsp;let&amp;nbsp;me&amp;nbsp;know&amp;nbsp;if&amp;nbsp;you&amp;nbsp;have&amp;nbsp;more&amp;nbsp;questions&amp;nbsp;about&amp;nbsp;this.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Zack&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 24 Sep 2021 18:12:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101761#M10472</guid>
      <dc:creator>ZackAllen</dc:creator>
      <dc:date>2021-09-24T18:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticating to use organization webmap</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101948#M10474</link>
      <description>&lt;P&gt;Thank you for the reply. I am using ArcGis Online as far as I know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I am using a set username and password for the application, and then authenticating that way.&lt;/P&gt;&lt;P&gt;I have also been looking into using a proxy to do all the hand-shaking, but I am also not sure how to implement a proxy into the application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will try and figure it out from your reply, and will post an update with code to how its going &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Sep 2021 14:14:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1101948#M10474</guid>
      <dc:creator>ThomasMoe</dc:creator>
      <dc:date>2021-09-26T14:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Authenticating to use organization webmap</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1243724#M11569</link>
      <description>&lt;P&gt;Did you ever find a resolution? -- Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 04:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/authenticating-to-use-organization-webmap/m-p/1243724#M11569</guid>
      <dc:creator>Hubbard</dc:creator>
      <dc:date>2022-12-27T04:36:18Z</dc:date>
    </item>
  </channel>
</rss>

