Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application_iOS_Add.ps1 has couple of bugs #262

Open
breakpoint7 opened this issue Jan 10, 2024 · 0 comments
Open

Application_iOS_Add.ps1 has couple of bugs #262

breakpoint7 opened this issue Jan 10, 2024 · 0 comments

Comments

@breakpoint7
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant