citrix / citrix-mam-sdks

The MAM SDK instrument your apps to enable enforcing policies and controls that are configured in Citrix Endpoint Management.
https://developer.cloud.com/citrixworkspace/mobile-application-integration
11 stars 4 forks source link

We are implementing per app SSO VPN for our applications- Is there a API to get the username? #64

Open DivyaKaruna opened 2 years ago

DivyaKaruna commented 2 years ago

We are converting MDX toolkit (end of life) to Per app SSO VPN. We want to get the username (6 letters username to be precise example: divkar) . Is there an API for the username without MAM implementation?

Happy to answer if you have any questions.

Thanks Divya

jaspreetsingh-citrix commented 2 years ago

Hi @DivyaKaruna, I believe for PerAppSSO VPN feature, the app will be pushed by MDM. The username (and other info) can also be pushed along if on the CEM server an Application Config policy is configured with username macro.

This article explains how to set up Application Config for iOS https://docs.citrix.com/en-us/citrix-endpoint-management/policies/app-configuration-policy.html

Sample plist format

MyUserName ${user name macro here}

The article goes over various macros: https://docs.citrix.com/en-us/citrix-endpoint-management/deploy-resources/macros.html

To read the resolved username on CEM-MDM pushed iOS app, call this. NSDictionary *mdmAppConfigDictionary = [[NSUserDefaults standardUserDefaults] objectForKey:@"com.apple.configuration.managed"];

jaspreetsingh-citrix commented 2 years ago

Hi @DivyaKaruna, Just checking if you were able to get the username.