fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Display a different screen for Android end users after selecting Enroll

Open spalmesano0 opened this issue 6 months ago • 9 comments

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

spalmesano0 avatar May 15 '26 15:05 spalmesano0

@georgekarrv This has been tested and is ready for review.

spalmesano0 avatar Jul 08 '26 19:07 spalmesano0

Hey @spalmesano0 can you please bring this to the next #g-byod design review? cc @Leanngove

noahtalerman avatar Jul 22 '26 17:07 noahtalerman

@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.

spalmesano0 avatar Jul 22 '26 17:07 spalmesano0

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?

noahtalerman avatar Jul 22 '26 21:07 noahtalerman

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 avatar Jul 22 '26 21:07 Leanngove

@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';

spalmesano0 avatar Jul 23 '26 15:07 spalmesano0

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.

noahtalerman avatar Jul 23 '26 18:07 noahtalerman

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: Image

terry-kwok-code avatar Oct 28 '26 22:10 terry-kwok-code

Users enroll their phones clear guidance after choosing no confusion waits

fleet-release avatar Nov 17 '26 00:11 fleet-release