Skip to content

Commit

Permalink
only get active apps
Browse files Browse the repository at this point in the history
  • Loading branch information
almenscorner committed Mar 25, 2024
1 parent d11636a commit 61c2ddc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/IntuneCD/backup/Intune/Applications.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ def main(self) -> dict[str, any]:
"""
try:
self.graph_data = self.make_graph_request(
endpoint=self.endpoint + self.CONFIG_ENDPOINT
endpoint=self.endpoint + self.CONFIG_ENDPOINT,
params={
"$filter": "(microsoft.graph.managedApp/appAvailability) eq null or (microsoft.graph.managedApp/appAvailability) "
"eq 'lineOfBusiness' or isAssigned eq true"
},
)
except Exception as e:
self.log(
Expand All @@ -63,6 +67,7 @@ def main(self) -> dict[str, any]:

for app in self.graph_data["value"]:
self.platform_path = ""
app.pop("description", None)
scope_tag_data = [v for v in scope_tag_responses if app["id"] == v["id"]]
if scope_tag_data:
app["roleScopeTagIds"] = scope_tag_data[0]["roleScopeTagIds"]
Expand Down

0 comments on commit 61c2ddc

Please sign in to comment.