Graph API - Intune androidDeviceOwnerEnterpriseWiFiConfiguration change connectAutomatically

Michael Hogendoorn 1 Reputation point
2021-10-06T11:34:24.297+00:00

Hi,

I have created a Intune deviceconfiguration profile thats sets a WiFi profile. Within the gui of intune i am not able to set connect automatically flag. After reading this artikel I found out this flag can only be set using the Graph API. I have created a Microsoft ticket but because this is a beta request the cant help me.

When i try to PATCH url : https://graph.microsoft.com/beta/DeviceManagement/deviceConfigurations/<configurationprofileID> i recieve the following error HTTP 400:

{
    "error": {
        "code": "BadRequest",
        "message": "{\r\n  \"_version\": 3,\r\n  \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 707b5cb9-6b89-4126-96cd-dbdce74d395c - Url: https://fef.msub05.manage.microsoft.com/DeviceConfiguration_2109/StatelessDeviceConfigurationFEService/deviceManagement/deviceConfigurations%28%<configurationprofileID>%27%29?api-version=5021-06-23\",\r\n  \"CustomApiErrorPhrase\": \"\",\r\n  \"RetryAfter\": null,\r\n  \"ErrorSourceService\": \"\",\r\n  \"HttpHeaders\": \"{}\"\r\n}",
        "innerError": {
            "date": "2021-10-06T11:20:03",
            "request-id": "707b5cb9-6b89-4126-96cd-dbdce74d395c",
            "client-request-id": "707b5cb9-6b89-4126-96cd-dbdce74d395c"
        }
    }
}

I have done this in Graph API explorer and postman. I have the propper permissions: DeviceManagementConfiguration.ReadWrite.All. Is some one able to give me a valid Json?

Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,921 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,201 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Miguel Gonçalves 961 Reputation points
    2024-06-11T14:41:37.08+00:00

    Hi Michael,

    For WiFi profiles, you’ll need to include the "connectAutomatically": true property to enable automatic connection. Double-check your permissions. You mentioned having DeviceManagementConfiguration.ReadWrite.All, which should be sufficient.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.