Use the CatalogService directly:CatalogService cs = new CatalogService(); <a href="http://System.Net" target="_blank">System.Net</a>.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; cs.Url = @"<a href="https://server/arcgis/services" target="_blank">https://server/arcgis/services</a>"; // step 1. determine whether the arcgis server requires token bool requiretokens = cs.RequiresTokens(); // if token is required if (requiretokens) { // step 2. get the url for token server string tokenserviceurl = cs.GetTokenServiceURL(); // step 3. create a tokencredential TokenCredential tokencredential = new TokenCredential("user", "password"); // step 4. use a tokengenerator to get the token from token server TokenGenerator tokengenerator = new TokenGenerator(); string token = TokenGenerator.GenerateToken(tokenserviceurl, tokencredential); // request mobileService1.Url = "<a href="https://server/arcgis/services/Secured/RedlandsHydro/MapServer/MobileServer?token=" target="_blank">https://server/arcgis/services/Secured/RedlandsHydro/MapServer/MobileServer?token=</a>" + token; mobileService1.CacheStoragePath = @"<a href="file:C:/temp/mapcache931" target="_blank">C:\temp\mapcache931</a>"; if (mobileService1.CacheExists) mobileService1.DeleteCache(); mobileService1.Open(CacheOpenMode.Create); mobileService1.GetDataAsync(map1, false, null); }