OpsGenie and work profiles on Android 9
Asked by wxcamera:

How do I stop OpsGenie from popping up a message about granting it the permission to set the volume for alerts when DND is active. If you click settings, then it takes you to a screen where you can't do anything.

This is on a Pixel 3a, Android 9 with work profile enabled.

There is this discussion: <https://community.opsgenie.com/t/android-9-work-profile-and-opsgenie-in-dnd-mode/1029> which shows that I am not unique.

Thanks.


Answers:
author: Adam Chasen
body: This is not limited to the Pixel phones or OpsGenie (per documentation of other apps). Similar on 7.1.2 Sony Z5c.

The following quotation from the linked issue (which appears to be broken now) represents my experience as well:
> I can't seem to get through the Sounds/DND settings in my setup. In the OpsGenie "Sounds" menu, when I toggle the "always play opsgenie notification sounds at maximum...", there's a popup permission request to "Please grant OpsGenie permission to modify your Do Not Disturb settings". When I do that, I'm taken to the "Do Not Disturb access" Android menu, where other Google services appear but not OpsGenie. I don't see a way to get OpsGenie onto the DND access list.

This issue prevents me from receiving opsgenie notifications even though I have the "Interrupts Priority only". I was unable to find the "Do not disturb access" screen in settings to bring up outside of the app. It appears to be only available by the "settings" link in the "permissions request" modal.

![Screenshot_20190819-140021.png](https://community.atlassian.com/t5/image/serverpage/image-id/63685i613DE0FC93728C46/image-dimensions/225x400?v=v2 "Screenshot_20190819-140021.png")![Screenshot_20190819-140054.png](https://community.atlassian.com/t5/image/serverpage/image-id/63686i012AA3646449B895/image-dimensions/225x400?v=v2 "Screenshot_20190819-140054.png")![Screenshot_20190819-140048.png](https://community.atlassian.com/t5/image/serverpage/image-id/63684i80AA7A251611FD68/image-dimensions/225x400?v=v2 "Screenshot_20190819-140048.png")

The application shows it as a possible permission, but there appears to be no way to grant it.

![Screenshot_20190819-143643.png](https://community.atlassian.com/t5/image/serverpage/image-id/63690iC261BC109E8304E6/image-dimensions/200x356?v=v2 "Screenshot_20190819-143643.png")![Screenshot_20190819-143632.png](https://community.atlassian.com/t5/image/serverpage/image-id/63689i9DB7C5B2C5E52E49/image-dimensions/200x356?v=v2 "Screenshot_20190819-143632.png")![Screenshot_20190819-143626.png](https://community.atlassian.com/t5/image/serverpage/image-id/63691iC55A280E88254DB0/image-dimensions/200x356?v=v2 "Screenshot_20190819-143626.png")

This appears to be an issue for other similar applications (from [VictorOps instructions](https://help.victorops.com/knowledge-base/configure-android-9-devices/)):
> **NOTE:** If VictorOps does not appear in the list above, make sure that VictorOps was installed **through phone's main, top level account** from Google Play (as opposed to a secondary or tertiary personal/work/enterprise account). If it the app has not been installed through the main account, VictorOps will not appear as an option.

comments: author: Adam Chasen
body: [@Mark Campbell-Vincent](/t5/user/viewprofilepage/user-id/2365445)this is a work profile install


author: Huy
body: Thanks [@Adam Chasen](/t5/user/viewprofilepage/user-id/3530413) for that post! I had the same issue under Android 11 and fixed this issue by installing OpsGenie in the main (non work profile) account, per the VictorOps note above.


author: David Hartman
body: [@Huy](/t5/user/viewprofilepage/user-id/4263964) is there anything on the roadmap to allow OpsGenie DND override when it's installed in a Work Profile (Samsung Android 11) since I would rather keep my personal and work accounts strictly divided


author: Nakul Kedia
body: Hey [@David Hartman](/t5/user/viewprofilepage/user-id/1577207)   
This is Nakul from the Opsgenie Android team.

The issue is due to an Android restriction.  
From the Android docs:  
"Managed profiles cannot grant Do Not Disturb access."  
<https://developer.android.com/reference/android/provider/Settings#ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS>   

"The Android platform allows devices to have work profiles (sometimes referred to as managed profiles)."  
<https://developer.android.com/work/managed-profiles>

++The workaround we suggest is:++   
If you have Opsgenie on both "Personal Profile" and "Work Profile" you will be able to see Opsgenie in the DnD permission list of "Work Profile" and enable DnD access to Opsgenie.  
If you then uninstall Opsgenie from "Personal Profile", Opsgenie will stop showing up in the list of "Work Profile", but it will still bypass DnD as expected.

Hope this works!  
Please let us know if you have any further questions.


author: Don McNamara
body: [@Nakul Kedia](/t5/user/viewprofilepage/user-id/4308640) Have you tested this in Android 12? I can't seem to get this to work.

I added the app to both my work and personal profiles, I can see the DND permissions and set them, but when I launch the work profile OpsGenie app, it gives me the same warning ("Opsgenie requires additional permissions to override Do not Disturb...") and does not appear to be changing the alerts volumes/etc.


author: Huy
body: [@Don McNamara](/t5/user/viewprofilepage/user-id/2970513) I'm not from Opsgenie team but I am on Android 12 (Nov patch, Pixel 6) and it seems fine for me. I made sure 'Do not disturb access' (search Settings) is allowed for Opsgenie. I have it installed in both work profile and outside.


author: Kirby Lagroix
body: I just transitioned from a Pixel 3 (Android 12) to a new Pixel 6 Pro (Android 12) and am having the same issue. I cannot select the option to 'Allow OpsGenie to set ringtone volume'. I keep getting the Permission Request popup but the resulting screen doesn't let me do anything. I have OpsGenie installed on my personal as well as work profile.


author: Mike Parsons
body: I am also on a pixel 6 pro with Opsgenie installed on my work / personal profile. I am able to grant the exception on my personal profile, but cannot on my work profile. Alerts do not bypass the DND setting


author: gtirloni
body: The workaround does not work on Android 13 (Samsung OneUI 5.1).

Installing OpsGenie in the main profile does not allow the OpsGenie in the work profile to disable DND, so notifications are missed.


author: Mark Campbell-Vincent
body: Hi [@wxcamera](/t5/user/viewprofilepage/user-id/3329994) - I'm wondering if this issue is occurring only for Pixel phones. I set up a work profile and have updated to version 9(Samsung S8), but I did not run into this issue. Just to be thorough, could you possibly disable your work profile to see if this gives the same result?

comments: author: Philip Gladstone
body: If I use opsgenie from my personal profile, then I get sent to the "Do Not Disturb access" page which does list OpsGenie, and I can then enable it.

Now, when I start the OpsGenie in my work profile, it starts and doesn't ask me about setting the Do Not Disturb access. It would appear that this might be an Android bug as I would have thought that the work-profile opsgenie should only have access to the work profile do-not-disturb.

However, when I create a test notification (after uninstalling the personal profile opsgenie) and I have do-not-disturb enabled, the work-profile opsgenie does not succeed in disabling the do-not-disturb, so I didn't get notified.

I'm running build PQ3B. 190605.006


author: Mark Campbell-Vincent
body: [@Philip Gladstone](/t5/user/viewprofilepage/user-id/45119) Could you check if this is occurring with your other applications? Also, downloading the Opsgenie app with your work profile or your personal profile could make the difference with the DND settings. Would you know which profile was used to download the app?


author: wxcamera
body: I don't recall which profile I initially download the opsgenie app -- I suspect it was my personal profile. I then downloaded it for my work profile and uninstalled the personal profile version.

I don't know how to get to the do-bot-disturb settings for work profile -- but I don't have many work apps, but I can try doing some tests with slack.


author: Adam Chasen
body: edit: promoted to top level answer


author: Mark Campbell-Vincent
body: Hi [@Adam Chasen](/t5/user/viewprofilepage/user-id/3530413) - Is this occurring with your Work profile? Thanks for providing this information.


author: SergeMorel
body: Also receiving this issue on my work profile.

All is fine on my personal profile


author: David Kane
body: *Deleted*


author: Eli-Goldberg
body: Having the same issue, really frustrating


author: Ivan Torres
body: Encountered the same issue, Pixel 6, Android 12. Had to install to my personal profile, and uninstall on work profile. Couldn't get anything else to work.


author: Thomas L
body: \[Edit\] [gtirloni](https://community.atlassian.com/t5/user/viewprofilepage/user-id/629331)'s suggestion below worked, my bad!

(2024) I'm having the same issue on a Samsung Galaxy S23+

OpsGenie is installed on my work profile, but when prompted to allow DND override, there are no apps to select from.

I can't follow the workaround mentioned above (install on my personal profile) because of a broken logic loop when logging in:

- Opsgenie (Android personal profile) prompts me to login

- I enter my work email

- Opsgenie redirects to the Google account selection screen on my Samsung device

- Work account is not available, because I am in my Android personal profile

- I try to add my work account to my Android personal profile

- Error: "Account already exists on this device" (even if it didn't exist yet, it's a managed Google account, which has restrictions set so that users cannot log into it from a personal profile)

Has anyone else run into this? Is there a way to allow these permissions from an MDM?


author: gtirloni
body: You don't need to login to the personal app to set DND in Android. Just edit the app's permissions in Android and allow it.


author: Thomas L
body: It worked, thank you for the quick reply. I've edited my earlier comment.