Email passwordSolved

Participant
Discussion
7 years ago

Assuming that a) your using a Samsung SAFE device b) A policy applies to more than one user:

When setting up email config in policy, is is possible to specify something in password field along lines of %password%, as you can specify email to be %email%?

Thanks in advance.

Replies (4)

Marked SolutionPending Review
Hexnode Expert
7 years ago
Marked SolutionPending Review

Hi Michael,

We support variables in the Policy. So you can specify variables such as %email% or %username% or %userPrincipalName% or %domain% etc.

If the users are local users, We will replace the variables with user’s details and send it to the device. If the users are from Active Directory or any other Directory Services we will replace that with corresponding LDAP attributes and send it to the devices.

For Password, you want to send a value as a password then you can add that. If you leave blank, we will prompt the user to type the password and you do not need to specify anything in that box.

We are expanding this module in our upcoming releases, so you can send any of your LDAP (or your directory service) attributes and send it to them.

Hope this helps, please feel free to contact us for any help.

Thanks and regards
Hexnode Support Team
+1-866-498-9407 (US Toll Free)
+44-(800)-3689920(UK Toll Free)
+61-1800165939 (Australia Toll Free)
+1-510-545-9700 (Intl)
Hexnode | Mitsogo Inc.

Marked SolutionPending Review
Participant
7 years ago
Marked SolutionPending Review

Hi,

That was what I was considered doing.  However, what I noticed when I did this was:

1.  Email settings were pushed to device, email password was prompted for on device (fine)

2.  Once email password is input on device, email setup goes fine.  However, if subsequent policy changes (not related to email) are made, when these are pushed to the device, the email settings will be again be pushed to the device.  This is not necessary and causes the email client on the phone to attempt to setup a duplicate email account.

Many thanks,

Michael

Marked SolutionPending Review
Participant
7 years ago
Marked SolutionPending Review

First off, I am very glad to hear about any LDAP attributes being able to be used in future, that would be ideal for me.  Do you support OpenLDAP as well as Microsoft AD?

Anyway, I think I have discovered a solution that will work for me (basically I am using a large policy for 99% of config and a small user specific policy just for email, then associating both with a given user – this seems to give better results than an empty password).

However looking into this further, I started to look at editing policies via your API and as per your documentation (https://www.hexnode.com/mobile-device-management/help/hexnode-mdm-api-documentation/#edit-policy), I was doing this:

curl -H “Authorization: <API KEY>” -H “Content-Type: application/json” -d ‘{ “policyName”: Sales Team Policy”,”policyDescription”:””, “ios”:{“password”:{“allow_simple”:true,”force_pin”:true,”forcePIN”:false,”max_failed_attempts”:-1, “max_grace_period”:-1,”max_inactivity”:-1,”max_pinage_in_days”:””,”min_complex_chars”:-1,”min_length”:-1,”pin_history”:””,”require_alphanumeric”:false},”delete_credentials”:[]},”ios_configured”:true }’ https://<portal&gt;.hexnodemdm.com/api/v1/policy/<ID>/ -X PUT

Obviously I put in appropriate API key, portal, and policy ID in.  This no longer seems to work:

{“detail”:”JSON parse error – No JSON object could be decoded”}

So I modified it to this, which seemed better formed JSON:

curl -H “Authorization: <API Key>” -H “Content-Type: application/json” -d ‘{ “name”: “Sales Team Policy”,”description”:””, “ios”:{“password”:{“allow_simple”:true,”force_pin”:true,”forcePIN”:false,”max_failed_attempts”:-1, “max_grace_period”:-1,”max_inactivity”:-1,”max_pinage_in_days”:30,”min_complex_chars”:-1,”min_length”:-1,”pin_history”:5,”require_alphanumeric”:false},”delete_credentials”:[]},”ios_configured”:true }’ https://<portal&gt;.hexnodemdm.com/api/v1/policy/<ID>/ -X PUT

But it failed in less obvious way:

{“detail”:”Sorry, Something went wrong, An unexpected condition was encountered while the server was attempting to fullfill the request”}

I also tried:

curl -H “Authorization: <API Key>” -H “Content-Type: application/json” -d ‘{ “name”: “foobar”,”description”:””, “android”:{“email”:{“account_name”:”%name%”,”account_description”:”Email”,”email_address”:”%email%”,”incoming_account_type”:”imap”,”incoming_server_host_name”:”<IP>”,”incoming_server_port”:993,”incoming_server_username”:”%username%”,”incoming_password”:”foobar”,”incoming_server_use_ssl”:true,”incoming_server_use_tls”:false,”incoming_server_use_certificate”:false,”out_account_type”:”smtp”,”out_server_host_name”:”<IP>”,”out_server_port”:587,”out_server_username”:”%username%”,”out_password”:”foobar”,”out_server_use_ssl”:false,”out_server_use_tls”:true,”out_server_use_certificate”:false}},”android_configured”:true }’ https://<portal&gt;.hexnodemdm.com/api/v1/policy/<ID>/ -X PUT

Same: {“detail”:”Sorry, Something went wrong, An unexpected condition was encountered while the server was attempting to fullfill the request”}

Am I doing something wrong or is this a limitation of a trial account I am not aware of?  One thing I did notice with latter two was: while they did not edit the policy settings specified in the JSON, they did +1 increase the policies version numbers.

Retrieving info about policies worked fine using the API, just editing via API was the issue.

Any help would be greatly appreciated.

Marked SolutionPending Review
Hexnode Expert
7 years ago
Marked SolutionPending Review

Hello Michael,

Regarding your concerns

(i) We do not support Open LDAP or Azure AD currently. But it will be available in the future.

(ii) The issue in email policy you mentioned is not something that is supposed to happen. We tried to recreate the issue here, but we didn’t find any problem. In fact, it worked perfectly. However, we are curious to know why this happened to you. It would be great if you could share some more information about the policy. You can drop a mail to our support or we can contact you. Just let us know what time works for you.

(iii) The error in the API has been fixed and updated. You will not find the issue anymore.

Hope this helps. We do have instant chat, email and phone support available.

Thanks and regards
Hexnode Support Team
+1-866-498-9407 (US Toll Free)
+44-(800)-3689920(UK Toll Free)
+61-1800165939 (Australia Toll Free)
+1-510-545-9700 (Intl)
Hexnode | Mitsogo Inc.

Save