EraseDeviceCommand ReturnToService MDM and Wifi Payloads

Has anyone figured out the format for the new iOS 17 ReturnToServie payload for MDMProfileData and WiFiProfileData payloads? Do these support encryption like they do in the InstallProfile command?

https://developer.apple.com/documentation/devicemanagement/erasedevicecommand/command/returntoservice

Replies

Eventually I did get a payload send to the device. It was required to be encrypted, just like when sending the InstallProfile command. It was basically the exact same payload. Without encryption, it would fail to apply the EraseDevice command with an error that the wifi payload was incorrect.

However, after successfully wiping the device, the Wifi Profile does not appear to be taking effect. The wifi connection is not automatically made. Does anyone have experience getting the actual wifi connection to work?

I did tried to implement ReturnToService in wipe command. Tried below options

  1. When I send wifi profile with encryption, duing device setup after wipe, wifi is not getting connected but skipping wifi screen and trying download MDM payload during DEP flows.
  2. When I send wifi profile with out encryption, Wifi is getting connect during device setup automatically and first time device not able to download MDM profile and on click of try again button, it is able to download profile

So long story short, With out encryption of WifiProfile, ReturnToService worked for me.

If anyone tried with encryption of wifi profile and worked please share the steps here\

Thanks in adavance.