'How to make the device connect to wifi after scan the QR for enrolling android device in Android Management API?

I used to enroll an android device by DPC method. Now I am trying to switch to Android Management API method however I can't manage to make the device auto connect to WiFi after scan the QR code.

I am trying to configure wifi network as below but not work, after scan QR code it still ask me to connect to wifi network manually

"openNetworkConfiguration": {
"NetworkConfigurations": [
  {
    "Type": "WiFi",
    "GUID": "a0989e28-9c23-43e5-b5d3-9b37d86723a3",
    "WiFi": {
      "AutoConnect": true,
      "Passphrase": "YYY",
      "Security": "WPA-PSK",
      "SSID": "XXX"
    },
    "Name": "ABC"
  }
]

}



Solution 1:[1]

Android can directly connect to wifi during 6-tap provisioning if it is able to find EXTRA PROVISIONING values in QR code config.

In the QR Code config add:

With these values in QR code, android will be directly able to identify wifi and connect to it automatically.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gokul