I must be missing something. I need to query a secured AGOL hosted feature service but I can't figure out how to turn the feature layer into a table using credentials. Does anyone have a simple snippet on how to do this?
Tom
That works. Thanks!!!!
Hello Tom,
You can create a ServiceFeatureTable and set the credentials property and then load the table. Please refer to code snippet below.
```
var creds = await AuthenticationManager.Current.GenerateCredentialAsync(new Uri(@"http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire_secure/FeatureServer/0"),"user1","user1"); var ft = new ServiceFeatureTable(new Uri("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire_secure/FeatureServer/0")); ft.Credential = creds; await ft.LoadAsync();
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.