<?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 ArcGIS Runtime 100.8 &amp; Oauth2 in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgis-runtime-100-8-oauth2/m-p/544108#M6680</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the following example, about oauth2 authentication&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/latest/wpf/sample-code/authenticate-with-oauth/"&gt;https://developers.arcgis.com/net/latest/wpf/sample-code/authenticate-with-oauth/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;running this example without changes and after pop-up authentication, i can see every items that i've published&lt;/P&gt;&lt;P&gt;inside my webmap (basemap + a portal feature layer) in a private user and group defined for, when it was created the "application"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read that should be possible, to use a Client Secret and change this type of authentication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I would like to establish an authentication and authorization in background, by code, without an user interaction.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every one could me suggest, which line should be modified on code in the example, to make it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've try to change the code in this way&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If a client secret has been configured, set the authentication type to OAuthAuthorizationCode.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!String.IsNullOrEmpty(ClientSecret))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use OAuthAuthorizationCode if you need a refresh token (and have specified a valid client secret).&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverInfo.TokenAuthenticationType = TokenAuthenticationType.&lt;STRONG&gt;OAuthClientCredentials&lt;/STRONG&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverInfo.OAuthClientInfo.ClientSecret = ClientSecret;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but, when i run the example, i see my webmap with the selected basemap but my feature service it doesn't appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the CreateCredentialAsync method, when "CredentialRequestInfo" is for my "Feature Layer" invoked&amp;nbsp; i see that the token generated its already expired and i don'n know why, maybe this could be the problem, how to solve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope my problem it was well explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you id advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jul 2020 13:58:14 GMT</pubDate>
    <dc:creator>MassimilianoGeppi</dc:creator>
    <dc:date>2020-07-20T13:58:14Z</dc:date>
    <item>
      <title>ArcGIS Runtime 100.8 &amp; Oauth2</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgis-runtime-100-8-oauth2/m-p/544108#M6680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to use the following example, about oauth2 authentication&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/net/latest/wpf/sample-code/authenticate-with-oauth/"&gt;https://developers.arcgis.com/net/latest/wpf/sample-code/authenticate-with-oauth/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;running this example without changes and after pop-up authentication, i can see every items that i've published&lt;/P&gt;&lt;P&gt;inside my webmap (basemap + a portal feature layer) in a private user and group defined for, when it was created the "application"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I read that should be possible, to use a Client Secret and change this type of authentication.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I would like to establish an authentication and authorization in background, by code, without an user interaction.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every one could me suggest, which line should be modified on code in the example, to make it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've try to change the code in this way&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // If a client secret has been configured, set the authentication type to OAuthAuthorizationCode.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (!String.IsNullOrEmpty(ClientSecret))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Use OAuthAuthorizationCode if you need a refresh token (and have specified a valid client secret).&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverInfo.TokenAuthenticationType = TokenAuthenticationType.&lt;STRONG&gt;OAuthClientCredentials&lt;/STRONG&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverInfo.OAuthClientInfo.ClientSecret = ClientSecret;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but, when i run the example, i see my webmap with the selected basemap but my feature service it doesn't appear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the CreateCredentialAsync method, when "CredentialRequestInfo" is for my "Feature Layer" invoked&amp;nbsp; i see that the token generated its already expired and i don'n know why, maybe this could be the problem, how to solve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope my problem it was well explained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you id advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jul 2020 13:58:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgis-runtime-100-8-oauth2/m-p/544108#M6680</guid>
      <dc:creator>MassimilianoGeppi</dc:creator>
      <dc:date>2020-07-20T13:58:14Z</dc:date>
    </item>
  </channel>
</rss>

