PolicySets are missing policies when the tenant has more than 100 policies
Opened this issue · 10 comments
When a PolicySet is created in a tenant with more than 100 policies, any policy set that is created which includes policies beyond the first 100 will have missing XML errors in the policy set.
Hello,
That is a weird one. Is it 100 policies in total or 100 policies if a specific kind eg Configuration Policies. Do you gave a log you can attach? Also the error, is that during listing,exporting, importing or documenting a Policy Set? Sounds like after import but just to be sure.
Cheers!
Some additional information.
The target tenants have over 1000 configuration profiles.
Intune does not return all 1000 profiles immediately. The first 100 are returned and display a message at the top of the page that the full list is being compiled. After a few seconds, a ‘Ready’ button appears to merge the results. Intune then returns the full set of data.
When adding a policy to the policy set, Intune paginates the list of available policies with a ‘load more’ prompt.
I am wondering if the Policy Set API has a similar behaviour, which is preventing the import from correctly referencing some of the configuration profiles.
Thanks
JJ
Hello,
Sorry I've been away from the computer during the holidays and thank you for all the troubleshooting.
I attached an updated version. I hope this will fix it. The dependency during import loaded only the first page. Policies with multiple pages would then not be available and import would fail. This will load a lot of data so memory usage and import time will increase.
Cheers
Thank you - I will test the new code and let you know the results.
I have started testing the policy set exports.
Policysets do not export the PolicySets Node of Intune Manager. The log does not generate any errors, but no files are saved.
However, if I use the Bulk Export option and select the Policy sets Object Type, then the policy sets to export.
I will test the import and advise futher.
I have tested importing PolicySets (Same Tenant), and all the policies are now being added to the PolicySet :).
Thank you for your help with this.
Hello,
Thank you for the update!
I have no issues exporting a single Policy Set. I did some simple tests but all worked.
I'll see if I can do some more tests later.
Cheers!