You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrating Application_iOS_Add.ps1 into some automation scripts, I kept getting errors from the JSON being generated.
I ended up making a few changes in order to get it to generate a correct payload:
Changed:
$iconType = $iconResponse.Headers["Content-Type"]
to
$iconType = $iconResponse.Headers["Content-Type"][0]
and the logic for setting minimum version did not work , so the min version was always false for every item. Updated as follows:
minimumSupportedOperatingSystem=@{
"@odata.type" = "microsoft.graph.iosMinimumOperatingSystem"
v8_0=$osVersion -lt 9.0;
v9_0=$osVersion.ToString().StartsWith("9")
v10_0=$osVersion.ToString().StartsWith("10")
v11_0=$osVersion.ToString().StartsWith("11")
v12_0=$osVersion.ToString().StartsWith("12")
v13_0=$osVersion.ToString().StartsWith("13")
v14_0=$osVersion.ToString().StartsWith("14")
v15_0=$osVersion.ToString().StartsWith("15")
v16_0=$osVersion.ToString().StartsWith("16")
};
After making these changes, the payloads worked as expected.
The text was updated successfully, but these errors were encountered:
Integrating Application_iOS_Add.ps1 into some automation scripts, I kept getting errors from the JSON being generated.
I ended up making a few changes in order to get it to generate a correct payload:
Changed:
$iconType = $iconResponse.Headers["Content-Type"]
to
$iconType = $iconResponse.Headers["Content-Type"][0]
and the logic for setting minimum version did not work , so the min version was always false for every item. Updated as follows:
minimumSupportedOperatingSystem=@{
"@odata.type" = "microsoft.graph.iosMinimumOperatingSystem"
v8_0=$osVersion -lt 9.0;
v9_0=$osVersion.ToString().StartsWith("9")
v10_0=$osVersion.ToString().StartsWith("10")
v11_0=$osVersion.ToString().StartsWith("11")
v12_0=$osVersion.ToString().StartsWith("12")
v13_0=$osVersion.ToString().StartsWith("13")
v14_0=$osVersion.ToString().StartsWith("14")
v15_0=$osVersion.ToString().StartsWith("15")
v16_0=$osVersion.ToString().StartsWith("16")
};
After making these changes, the payloads worked as expected.
The text was updated successfully, but these errors were encountered: