From c948266ee08dad0745f950ef522fe4224621c645 Mon Sep 17 00:00:00 2001 From: Ian Littman Date: Thu, 24 Oct 2024 09:09:52 -0500 Subject: [PATCH] Fix manual MDM profile download (#23171) #23162 By default, Axios treats responses as if they're JSON, and the content type delivered for mobileconfig files doesn't make Axios switch back to providing the download as a blob. Explicitly telling Axios to give us a blob back fixes the issue where profiles were 50% larger than they should have been...and unparseable. # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Manual QA for all new/changed functionality --- frontend/services/entities/mdm.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/services/entities/mdm.ts b/frontend/services/entities/mdm.ts index 7a4efca932..c851bc7b7f 100644 --- a/frontend/services/entities/mdm.ts +++ b/frontend/services/entities/mdm.ts @@ -334,7 +334,12 @@ const mdmService = { downloadManualEnrollmentProfile: (token: string) => { const { DEVICE_USER_MDM_ENROLLMENT_PROFILE } = endpoints; - return sendRequest("GET", DEVICE_USER_MDM_ENROLLMENT_PROFILE(token)); + return sendRequest( + "GET", + DEVICE_USER_MDM_ENROLLMENT_PROFILE(token), + undefined, + "blob" + ); }, };