Skip to content

Instantly share code, notes, and snippets.

@torgro
Created November 3, 2020 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save torgro/a8bbba84abfa68d62224716ad724ffcf to your computer and use it in GitHub Desktop.
Save torgro/a8bbba84abfa68d62224716ad724ffcf to your computer and use it in GitHub Desktop.
/*Exception details:
https://fef.msub03.manage.microsoft.com/DeviceConfiguration_2010/StatelessDeviceConfigurationFEService/deviceManagement/deviceConfigurations?api-version=5020-09-25
iosWiFiConfiguration as JSON
{
"connectAutomatically": true,
"connectWhenNetworkNameIsHidden": true,
"disableMacAddressRandomization": false,
"networkName": "4999",
"preSharedKey": "ThaKey12348",
"proxySettings": "none",
"ssid": "4999",
"wiFiSecurityType": "wpaPersonal",
"description": "automated",
"displayName": "4999",
"roleScopeTagIds": [
"0"
],
"supportsScopeTags": true,
"version": 1,
"@odata.type": "#microsoft.graph.iosWiFiConfiguration"
} */
var scope = new List<string>
{
"0"
};
var prof = new IosWiFiConfiguration
{
PreSharedKey = "ThaKey12348",
SupportsScopeTags = true,
RoleScopeTagIds = scope,
DisplayName = "4999",
NetworkName = "4999",
Version = 1,
WiFiSecurityType = WiFiSecurityType.WpaPersonal,
DisableMacAddressRandomization = false,
Ssid = "4999",
ProxySettings = WiFiProxySetting.None,
ConnectAutomatically = true
};
var newProfile = graphCli.DeviceManagement.DeviceConfigurations
.Request()
.AddAsync(prof);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment