<?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 How do I populate createdby/modifiedby fields when creating new features? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-i-populate-createdby-modifiedby-fields-when/m-p/516652#M20089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an app which uses the iOS Runtime SDK v100.6 which loads feature services from an on-premise installation of Portal for ArcGIS v10.7.1. The feature layers were loaded&amp;nbsp;onto the map directly from their urls without requiring the user to authenticate with the portal. When the user creates a new feature and applies the edits, I can&amp;nbsp;view the new feature in ArcGIS Pro, but the CREATIONUSER and LASTUSER fields both have the value "Esri_Anonymous".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="attribute table for feature class showing &amp;quot;esri_anonymous&amp;quot; where username should go." class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/485032_Screen Shot 2020-03-13 at 1.36.39 PM.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I recognized that it is necessary to log the user into the portal before making edits, so I modified the initialization to do so (Slight variation from &lt;A href="https://developers.arcgis.com/ios/latest/swift/guide/access-content.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Esri documentation&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;override func &lt;SPAN class="token function"&gt;viewDidLoad&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSPortal&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;NSURL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;string&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://mycompanysserver.com/portal"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt; as 
    URL&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; loginRequired&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portal&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;load&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;completion&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;err&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; in
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; let error &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; err &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Successfully logged into portal."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addOperationalLayersFromPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

func &lt;SPAN class="token function"&gt;addOperationalLayersFromPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    var loadedCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
    DispatchQueue&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;main&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;async &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        SVProgressHUD&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;showProgress&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; status&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Loading Layer \(loadedCount)/25"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;removeAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;allLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;removeAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; let portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portal &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; let user &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; portal&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//If logged in successfully&lt;/SPAN&gt;
            var loadedCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
            DispatchQueue&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;main&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;async &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                SVProgressHUD&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;showProgress&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; status&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Loading Layer \(loadedCount)/25"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
            let featureStagingService &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; portal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; itemID&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureStagingServiceId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i in &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                let layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; featureStagingService&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layerID&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                    
                featureLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                allLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

                layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;load&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;completion&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; in
                    loadedCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; loadedCount &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
                    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;updateLoadingProgress&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;loadedCount&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outOf&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; withMessage&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Loading Layer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                        
                    guard error &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; nil &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Error loading layer "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;": "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; error&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;localizedDescription&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;
                    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;onFinishedLoading&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numb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t;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;loading the layers like this fails:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=8, NSUnderlyingError=0x2839092c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &amp;lt;340D6EFF-6BD9-47E7-AD68-F9508910203E&amp;gt;.&amp;lt;115&amp;gt;, _NSURLErrorRelatedURLSessionTaskErrorKey=(&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"LocalDataTask &amp;lt;340D6EFF-6BD9-47E7-AD68-F9508910203E&amp;gt;.&amp;lt;115&amp;gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=&lt;A href="https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true" target="_blank"&gt;https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true&lt;/A&gt;, NSErrorFailingURLKey=&lt;A href="https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true" target="_blank"&gt;https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true&lt;/A&gt;, _kCFStreamErrorDomainKey=12}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The instance of portal is using a&amp;nbsp;&lt;A href="https://enterprise.arcgis.com/en/portal/latest/administer/windows/using-a-reverse-proxy-server-with-portal-for-arcgis.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;reverse-proxy&lt;/A&gt;, and although I'm using the publicly accessible urls to reach the feature services, they are returning the internal urls behind the firewall and the http request fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this setup, what is the&amp;nbsp;correct way to load portal items as a logged in user?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:33:04 GMT</pubDate>
    <dc:creator>CoryDavis</dc:creator>
    <dc:date>2021-12-11T22:33:04Z</dc:date>
    <item>
      <title>How do I populate createdby/modifiedby fields when creating new features?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-i-populate-createdby-modifiedby-fields-when/m-p/516652#M20089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an app which uses the iOS Runtime SDK v100.6 which loads feature services from an on-premise installation of Portal for ArcGIS v10.7.1. The feature layers were loaded&amp;nbsp;onto the map directly from their urls without requiring the user to authenticate with the portal. When the user creates a new feature and applies the edits, I can&amp;nbsp;view the new feature in ArcGIS Pro, but the CREATIONUSER and LASTUSER fields both have the value "Esri_Anonymous".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="attribute table for feature class showing &amp;quot;esri_anonymous&amp;quot; where username should go." class="jive-emoji image-1 jive-image j-img-original" src="/legacyfs/online/485032_Screen Shot 2020-03-13 at 1.36.39 PM.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I recognized that it is necessary to log the user into the portal before making edits, so I modified the initialization to do so (Slight variation from &lt;A href="https://developers.arcgis.com/ios/latest/swift/guide/access-content.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Esri documentation&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;override func &lt;SPAN class="token function"&gt;viewDidLoad&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSPortal&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;NSURL&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;string&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://mycompanysserver.com/portal"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt; as 
    URL&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; loginRequired&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token boolean"&gt;true&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portal&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;load&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;completion&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;err&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; in
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; let error &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; err &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Successfully logged into portal."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addOperationalLayersFromPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

func &lt;SPAN class="token function"&gt;addOperationalLayersFromPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    var loadedCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
    DispatchQueue&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;main&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;async &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        SVProgressHUD&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;showProgress&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; status&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Loading Layer \(loadedCount)/25"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;removeAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;allLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;removeAll&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; let portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portal &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; let user &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; portal&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;user &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;//If logged in successfully&lt;/SPAN&gt;
            var loadedCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
            DispatchQueue&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;main&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;async &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                SVProgressHUD&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;showProgress&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; status&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Loading Layer \(loadedCount)/25"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
            let featureStagingService &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSPortalItem&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; portal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; itemID&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;featureStagingServiceId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i in &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                let layer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;AGSFeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; featureStagingService&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; layerID&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                    
                featureLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                allLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

                layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;load&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;completion&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; in
                    loadedCount &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; loadedCount &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
                    self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;updateLoadingProgress&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;loadedCount&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; outOf&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;25&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; withMessage&lt;SPAN class="operator token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Loading Layer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                        
                    guard error &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; nil &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                        &lt;SPAN class="token function"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Error loading layer "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; i&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;": "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; error&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;localizedDescription&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
                        &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt;
                    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
                &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
            self&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;onFinishedLoading&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/S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sp;loading the layers like this fails:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=8, NSUnderlyingError=0x2839092c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &amp;lt;340D6EFF-6BD9-47E7-AD68-F9508910203E&amp;gt;.&amp;lt;115&amp;gt;, _NSURLErrorRelatedURLSessionTaskErrorKey=(&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"LocalDataTask &amp;lt;340D6EFF-6BD9-47E7-AD68-F9508910203E&amp;gt;.&amp;lt;115&amp;gt;"&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=&lt;A href="https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true" target="_blank"&gt;https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true&lt;/A&gt;, NSErrorFailingURLKey=&lt;A href="https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true" target="_blank"&gt;https://company-server-behind-firewall.com/mapgallery/rest/services/EmergencyManagement/EM_FeatureStaging2/FeatureServer/15?f=json&amp;amp;returnAdvancedSymbols=true&lt;/A&gt;, _kCFStreamErrorDomainKey=12}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The instance of portal is using a&amp;nbsp;&lt;A href="https://enterprise.arcgis.com/en/portal/latest/administer/windows/using-a-reverse-proxy-server-with-portal-for-arcgis.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;reverse-proxy&lt;/A&gt;, and although I'm using the publicly accessible urls to reach the feature services, they are returning the internal urls behind the firewall and the http request fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this setup, what is the&amp;nbsp;correct way to load portal items as a logged in user?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:33:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-i-populate-createdby-modifiedby-fields-when/m-p/516652#M20089</guid>
      <dc:creator>CoryDavis</dc:creator>
      <dc:date>2021-12-11T22:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I populate createdby/modifiedby fields when creating new features?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-i-populate-createdby-modifiedby-fields-when/m-p/516653#M20090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Turns out it is necessary to secure any services where editor tracking is enabled. There is no way to keep it available to everyone and for new features to populate the createdby/modifiedby fields. After re-publishing the service, but only making it available to authenticated users, the user id was recorded in these fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2020 23:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-do-i-populate-createdby-modifiedby-fields-when/m-p/516653#M20090</guid>
      <dc:creator>CoryDavis</dc:creator>
      <dc:date>2020-04-22T23:44:08Z</dc:date>
    </item>
  </channel>
</rss>

