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

PolicySets are missing policies when the tenant has more than 100 policies #181

Open
jjrmilner opened this issue Dec 24, 2023 · 10 comments
Open

Comments

@jjrmilner
Copy link

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.

@Micke-K
Copy link
Owner

Micke-K commented Dec 27, 2023

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!

@jjrmilner
Copy link
Author

jjrmilner commented Dec 27, 2023 via email

@jjrmilner
Copy link
Author

Here are the screenshots on the target tenant after the import:
image

image

@jjrmilner
Copy link
Author

These are the only errors in the logs. I dont think they are relevant to the issues creating the policy sets but I have included them for reference:

image

image

image

image

image

@jjrmilner
Copy link
Author

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

@Micke-K
Copy link
Owner

Micke-K commented Jan 2, 2024

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

MSGraph.zip

@jjrmilner
Copy link
Author

Thank you - I will test the new code and let you know the results.

@jjrmilner
Copy link
Author

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.

@jjrmilner
Copy link
Author

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.

@Micke-K
Copy link
Owner

Micke-K commented Jan 10, 2024

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!

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

2 participants