<?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: Activate / Deactivate custom Add-In for Enterprise Credentials in ArcGIS Pro. in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1499667#M11776</link>
    <description>&lt;P&gt;Thank you for your support.&lt;BR /&gt;This worked, the tab is already visible while Pro is signed in.&lt;BR /&gt;What if I want to customize this signed in state to be only for Enterprise (not for public account or even Online Organization) ??&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jul 2024 07:17:05 GMT</pubDate>
    <dc:creator>Muhammad_Elbagoury</dc:creator>
    <dc:date>2024-07-01T07:17:05Z</dc:date>
    <item>
      <title>Activate / Deactivate custom Add-In for Enterprise Credentials in ArcGIS Pro.</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1497067#M11742</link>
      <description>&lt;P&gt;Hello All,&lt;BR /&gt;&lt;BR /&gt;I created a custom Add-In with number of groups and buttons.&lt;BR /&gt;I want to activate this add-in with all groups and buttons only if I am logged in to ArcGIS Pro using ArcGIS Enterprise credentials.&lt;/P&gt;&lt;P&gt;Please support,&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 12:07:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1497067#M11742</guid>
      <dc:creator>Muhammad_Elbagoury</dc:creator>
      <dc:date>2024-06-25T12:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Activate / Deactivate custom Add-In for Enterprise Credentials in ArcGIS Pro.</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1497339#M11746</link>
      <description>&lt;P&gt;You can use states and conditions.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Pro has an internal state defined by this id:&amp;nbsp;esri_core_isSignedIn&lt;/LI&gt;&lt;LI&gt;You can create your own custom condition using this state. New conditions are defined in daml.&lt;/LI&gt;&lt;LI&gt;Then add this condition to your controls.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In DAML, create this condition:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  ...
 &amp;lt;conditions&amp;gt;
      &amp;lt;insertCondition id="my_condition_Online"&amp;gt; 
	 &amp;lt;and&amp;gt;
	   &amp;lt;state id="esri_core_isSignedIn" /&amp;gt;
	 &amp;lt;/and&amp;gt;
      &amp;lt;/insertCondition&amp;gt;
 &amp;lt;/conditions&amp;gt;	
&amp;lt;/ArcGIS&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Then, add this condition to your control. Like this in config.daml&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;tab id="EsriCommunity_Tab1" caption="New Tab" condition="my_condition_Online"&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 25 Jun 2024 19:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1497339#M11746</guid>
      <dc:creator>UmaHarano</dc:creator>
      <dc:date>2024-06-25T19:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Activate / Deactivate custom Add-In for Enterprise Credentials in ArcGIS Pro.</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1499667#M11776</link>
      <description>&lt;P&gt;Thank you for your support.&lt;BR /&gt;This worked, the tab is already visible while Pro is signed in.&lt;BR /&gt;What if I want to customize this signed in state to be only for Enterprise (not for public account or even Online Organization) ??&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 07:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1499667#M11776</guid>
      <dc:creator>Muhammad_Elbagoury</dc:creator>
      <dc:date>2024-07-01T07:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: Activate / Deactivate custom Add-In for Enterprise Credentials in ArcGIS Pro.</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1502800#M11835</link>
      <description>&lt;LI-CODE lang="csharp"&gt;public class SignInChecker
{
    public static bool CheckSignInArcGISOnline()
    {
        bool signIn = false;
        signIn = QueuedTask.Run(() =&amp;gt;
        {
            // Get the active portal
            var activePortal = ArcGISPortalManager.Current.GetActivePortal();

            // Check if the active portal is ArcGIS Online or ArcGIS Enterprise
            if (activePortal != null)
            {
                var user = activePortal.GetSignOnUsername();
                if (string.IsNullOrEmpty(user))
                {
                    Console.WriteLine("User is not signed in.");
                    return false;

                }
                else
                {
                    var portalUri = activePortal.Uri;
                    if (portalUri.Host.Contains("arcgis.com"))
                    {
                        Console.WriteLine($"User is signed in to ArcGIS Online as: {user}");
                        return true;
                    }
                    else
                    {
                        Console.WriteLine($"User is signed in to ArcGIS Enterprise as: {user}");
                        return false;
                    }
                }
            }
            else
            {
                Console.WriteLine("No active portal found.");
            }
        });
        return signIn;
    }
}&lt;/LI-CODE&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/116221"&gt;@Muhammad_Elbagoury&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You can implement your own state/condition and use a function like this to determine if user is logged on to ArcGIS Online or Enterprise.&lt;/P&gt;&lt;P&gt;We have some Framework Concepts which can help you understand the concepts behind states and conditions:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#conditions-and-state" target="_blank"&gt;https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#conditions-and-state&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here is a tutorial which can help you guide how you can implement:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/documentation/arcgis-pro-sdk/tutorials/manage-the-pro-ui-with-conditions/" target="_blank"&gt;https://developers.arcgis.com/documentation/arcgis-pro-sdk/tutorials/manage-the-pro-ui-with-conditions/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 21:21:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1502800#M11835</guid>
      <dc:creator>VedantBajaj</dc:creator>
      <dc:date>2024-07-08T21:21:46Z</dc:date>
    </item>
    <item>
      <title>Re: Activate / Deactivate custom Add-In for Enterprise Credentials in ArcGIS Pro.</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1595460#M12749</link>
      <description>&lt;P&gt;In the appropriate place in the above code example you would then use the .Activate and .Deactivate methods similar to&amp;nbsp;&lt;SPAN&gt;FrameworkApplication.State.&lt;/SPAN&gt;&lt;STRONG&gt;Activate&lt;/STRONG&gt;&lt;SPAN&gt;("goodLogin_State").&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You would also want to us your own state instead of esri's internal predefined state variable.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;state id="goodLogin_State" /&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 23:15:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/activate-deactivate-custom-add-in-for-enterprise/m-p/1595460#M12749</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2025-03-13T23:15:20Z</dc:date>
    </item>
  </channel>
</rss>

