diff --git a/setup.cfg b/setup.cfg index be72711..c212cf0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = IntuneCD -version = 2.3.1 +version = 2.3.2 author = Tobias Almén author_email = almenscorner@outlook.com description = Tool to backup and update configurations in Intune diff --git a/src/IntuneCD/backup/Intune/Applications.py b/src/IntuneCD/backup/Intune/Applications.py index 9ea3f77..950fb19 100644 --- a/src/IntuneCD/backup/Intune/Applications.py +++ b/src/IntuneCD/backup/Intune/Applications.py @@ -63,7 +63,8 @@ def main(self) -> dict[str, any]: ) # as we must process each app individually, get the audit data up front - self.audit_data = self.make_audit_request(self.audit_filter) + if self.audit: + self.audit_data = self.make_audit_request(self.audit_filter) for app in self.graph_data["value"]: platform = None diff --git a/src/IntuneCD/backup/Intune/SettingsCatalog.py b/src/IntuneCD/backup/Intune/SettingsCatalog.py index 2b5eae0..b0008c6 100644 --- a/src/IntuneCD/backup/Intune/SettingsCatalog.py +++ b/src/IntuneCD/backup/Intune/SettingsCatalog.py @@ -27,6 +27,7 @@ def __init__(self, *args, **kwargs): ) self.assignment_endpoint = "deviceManagement/configurationPolicies/" self.assignment_extra_url = "/assignments" + self.config_audit_data = True def main(self) -> dict[str, any]: """The main method to backup the Settings Catalog @@ -52,7 +53,8 @@ def main(self) -> dict[str, any]: item_ids_dict, self.assignment_endpoint, self.assignment_extra_url ) # As we need to process each item individually, get the audit data up front - self.audit_data = self.make_audit_request(self.audit_filter) + if self.audit: + self.audit_data = self.make_audit_request(self.audit_filter) # Get the settings for each policy using batch request policy_responses = self.batch_request( item_ids, "deviceManagement/configurationPolicies/", "/settings?&top=1000" diff --git a/src/IntuneCD/intunecdlib/IntuneCDBase.py b/src/IntuneCD/intunecdlib/IntuneCDBase.py index b644849..37f66fb 100644 --- a/src/IntuneCD/intunecdlib/IntuneCDBase.py +++ b/src/IntuneCD/intunecdlib/IntuneCDBase.py @@ -47,7 +47,7 @@ def remove_keys(self, data: dict): if "VPPusedLicenseCount" in self.exclude: keys.add("usedLicenseCount") if "GPlaySyncTime" in self.exclude: - keys.add("lastSyncDateTime") + keys.add("lastAppSyncDateTime") if "CompliancePartnerHeartbeat" in self.exclude: keys.add("lastHeartbeatDateTime")