Display a different screen for Android end users after selecting Enroll
customer-cisneros-a: Gong snippet.
Goal
| User story |
|---|
| As a Fleet end user, |
| I want to know that I can close the tab for Android enrollment |
| so that I don't hit an error if I try to enroll twice. |
Change
- [x] Pull request: #48974.
- [x] Figma wireframe.
@georgekarrv This has been tested and is ready for review.
Hey @spalmesano0 can you please bring this to the next #g-byod design review? cc @Leanngove
@noahtalerman I won't be able to make it to that one, and I'm heading out on PTO. We reviewed this with @melpike when it was under #g-power-to-pc previously. Feel free to make any changes necessary to get it merged while I'm out.
I won't be able to make it to that one, and I'm heading out on PTO
Ah, ok. @Leanngove I assigned this to you. Can you please bring this to the next #g-byod design review? And help get it to merged with @spalmesano0 out?
Sounds good!
I believe Dante is out and you'll be on PTO as well... there won't be anyone at design review tomorrow unless I can pull in someone else who can review the change.
@Leanngove If you don't have a Google/Android Enterprise ID set up, you may need to manipulate your Fleet DB:
UPDATE app_config_json
SET json_value = JSON_SET(json_value, '$.mdm.android_enabled_and_configured', true);
INSERT INTO android_enterprises (signup_name, enterprise_id, pubsub_topic_id, signup_token, user_id)
VALUES ('test', 'fake-enterprise-id', 'fake-topic', 'fake-token', 1);
And then add this diff: https://github.com/fleetdm/fleet/pull/48974/changes/c71632e7adae2cf46d98ccb214bc46d19605648f
Otherwise, you'll get errors like "Android MDM is turned off." or "Couldn't get Android enrollment token."
To revert the DB manipulation:
UPDATE app_config_json
SET json_value = JSON_SET(json_value, '$.mdm.android_enabled_and_configured', false);
DELETE FROM android_enterprises WHERE enterprise_id = 'fake-enterprise-id';
Hey @Leanngove since we decided to put this to the side for now, I think we can unassign you, remove it from the #g-byod board, and remove the milestone. I just did that 👍
FYI @spalmesano0
P.S. Steven thanks again for taking a shot at this! We might come back to it in the future.
QA'd on main (3265a74d52, #53681) — passed.
Devices: Pixel 8a (Android 17, BYOD/work profile) in Chrome and Firefox; macOS in Chrome. End-user authentication (IdP) on.
| # | Flow | Result |
|---|---|---|
| 1 | Tap Enroll → Google setup opens in a new tab and first tab shows "After setup..." (no pop-up block) | ✅ |
| 2 | Finish enrollment, return to first tab → still "After setup...", no Enroll button; one host in All fleets | ✅ |
| 3 | Browser Back from next-steps → page reloads with a fresh token; second Enroll starts Google setup with no token error | ✅ |
| 4 | Try again → /enroll in same tab with secret, working Enroll | ✅ |
| 5 | IdP on → next-steps loads without a second IdP trip | ✅ |
| 6 | Same flow in Firefox (Android) | ✅ |
| 7 | /enroll/next-steps on macOS → redirected to /enroll macOS page | ✅ |
| – | Trailing slash /enroll/next-steps/ → enroll page, not admin UI | ✅ |
| – | /enroll/next-steps with no secret → /enroll "This URL is invalid" | ✅ |
| – | ?fully_managed=true QR page unchanged | ✅ |
Note: with IdP on, Try again and Back send the user through the IdP again before Enroll shows. This is expected: minting an Android token consumes the BYOD IdP session (since #52365).
Screenshot of the "After setup..." page on the Pixel:
Users enroll their phones clear guidance after choosing no confusion waits