Based PKI Sample code, I altered a bit to connect to https://portalpki.esri.com/gis to see if a web map can be displayed or not. This code base uses the app's keychain to retrieve the previously stored identifies.