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
Describe the bug
i'm working on this script to export policies from one Microsoft tenant and re create them in another tenant.
the script is as follows: $compliancePolicies = Get-MgDeviceManagementDeviceCompliancePolicy $configurationProfiles = Get-MgBetaDeviceManagementDeviceConfiguration
New-MgDeviceManagementDeviceCompliancePolicy : The property 'AdditionalProperties' does not exist on type 'microsoft.management.services.api.deviceComplianceDeviceOverview'. Make sure to only use property names that are defined by the type. Status: 400 (BadRequest) ErrorCode: ModelValidationFailure
which is a bit puzzeling since your documentation has [-AdditionalProperties ] as the first option for the command.
if i check the "AdditionalProperties" for type, i get this: $importcompliancePolicies[0].AdditionalProperties.GetType()
IsPublic IsSerial Name BaseType True True Hashtable System.Object
which seems to be in lien with what the documentation is asking for.
let me know what other information i can provide.
I've tried the beta version of graph and it fails with the exact error.
it also fails creating the configuration profiles (New-MgBetaDeviceManagementDeviceConfiguration)
To Reproduce
Steps to reproduce the behavior:
Execute -Mg- with ...
See error at ...
Expected behavior
A clear and concise description of what you expected to happen.
Debug Output
Run the problematic command with -Debug and paste the resulting debug stream below.
⚠ ATTENTION: Be sure to remove any sensitive information that may be in the logs.
Module Version
Please run Get-Module Microsoft.Graph* after cmdlet execution and paste the output below.
If a module cannot be installed or imported, please run Get-Module -ListAvailable and paste the output.
Environment Data
Please run $PSVersionTable and paste the output below. If running the Docker container image, indicate the tag of the image used and the version of Docker engine.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Thanks for reporting the bug. Please ensure you've gone through the following checklist before opening an issue:
Describe the bug
i'm working on this script to export policies from one Microsoft tenant and re create them in another tenant.
the script is as follows:
$compliancePolicies = Get-MgDeviceManagementDeviceCompliancePolicy
$configurationProfiles = Get-MgBetaDeviceManagementDeviceConfiguration
$exportcompliancePolicies = $compliancePolicies | Export-Clixml -Path $compliancePoliciesPath
$exportconfigurationProfiles = $configurationProfiles | Export-Clixml -Path $configurationProfilesPath
Disconnect-MgGraph
$importcompliancePolicies = Import-Clixml -Path $compliancePoliciesPath
$importconfigurationProfiles = Import-Clixml -Path $configurationProfilesPath
Connect-MgGraph -Scopes DeviceManagementConfiguration.ReadWrite.All
$importcompliancePolicies | New-MgDeviceManagementDeviceCompliancePolicy
the last command fails with this error:
New-MgDeviceManagementDeviceCompliancePolicy : The property 'AdditionalProperties' does not exist on type 'microsoft.management.services.api.deviceComplianceDeviceOverview'. Make sure to only use property names that are defined by the type. Status: 400 (BadRequest) ErrorCode: ModelValidationFailure
which is a bit puzzeling since your documentation has [-AdditionalProperties ] as the first option for the command.
if i check the "AdditionalProperties" for type, i get this:
$importcompliancePolicies[0].AdditionalProperties.GetType()
IsPublic IsSerial Name BaseType
True True Hashtable System.Object
which seems to be in lien with what the documentation is asking for.
let me know what other information i can provide.
I've tried the beta version of graph and it fails with the exact error.
it also fails creating the configuration profiles (New-MgBetaDeviceManagementDeviceConfiguration)
To Reproduce
Steps to reproduce the behavior:
-Mg-
with...
...
Expected behavior
Debug Output
Module Version
Environment Data
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: