diff --git a/README.md b/README.md
index 131508f5..22ebabbb 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
-
+
diff --git a/scubagoggles/__init__.py b/scubagoggles/__init__.py
index 8c8d3f87..d07c496f 100644
--- a/scubagoggles/__init__.py
+++ b/scubagoggles/__init__.py
@@ -4,4 +4,4 @@
All other references to the version number are derived from this value.
"""
-__version__ = '0.4.0'
+__version__ = '0.4.1'
diff --git a/scubagoggles/policy_api.py b/scubagoggles/policy_api.py
index 5106b265..1488e8f0 100644
--- a/scubagoggles/policy_api.py
+++ b/scubagoggles/policy_api.py
@@ -608,9 +608,20 @@ def _reduce(self, policies: Iterable):
# For the current policy setting, use the returned org unit id
# to get the org unit name, which is used as the key for the
# result dictionary.
- orgunit_id = policy['policyQuery']['orgUnit']
- orgunit_id = orgunit_id.removeprefix('orgUnits/')
- orgunit_name = self._orgunit_id_map[orgunit_id]['name']
+
+ if 'orgUnit' in policy['policyQuery']:
+ orgunit_id = policy['policyQuery']['orgUnit']
+ orgunit_id = orgunit_id.removeprefix('orgUnits/')
+ orgunit_name = self._orgunit_id_map[orgunit_id]['name']
+ else:
+ # NOTE: a policy setting should always be associated with
+ # an org unit. In rare cases, an org unit is not provided,
+ # and in this case the policy is associated with the top-level
+ # org unit.
+ log.debug('Org unit data missing for "%s", '
+ 'assuming top-level OU.',
+ policy['setting']['type'])
+ orgunit_name = self._top_orgunit
if 'group' in policy['policyQuery']:
group_id = policy['policyQuery']['group']