How to enable device administrator for exchange after user has declined
Make sure you have asked for the right permissions in manifest.
Also check your manifest declarations
Check your xml file.
For reference check this
https://developer.android.com/guide/topics/admin/device-admin.html