This document is aimed at providing a solution on Android devices for the annoying number of 2FA requests caused by trying to login to any University of Michigan service. Please note that using this script is as good as not having 2FA enabled, so do consider the security implications before proceeding.
Install Duo Mobile on your device and set up your account normally as per this ITS document. If you are already using Duo Mobile on your device you can skip this step
Download Tasker from the Play Store ($2.99)
Download AutoNotification
Download the DuoAutoAccept.tsk.xml from the repository
Import the task into Tasker (long press the Tasks tab)
Feel free to open the task and look at and modify the steps used to automate the process
To link the task to the Duo Mobile app, we must first create a profile that listens for a Notification UI Event and then runs the task when the appropriate event was fired. To do this, first add a new profile
Select "Event" for the Profile type
Select "UI" for the Event category
Select "Notification" for UI Event type
Give the profile a title if you desire and then select "Owner Application"
In the list of apps that appear, select Duo Mobile then tap back
Tap back again to go to the profile tab. You will be prompted to select a task to link to the profile. Select the imported task. You have now linked the task to the profile!
Your phone should now accept any Duo Mobile Notifications automatically.