Skip to content

Commit 1d3b68d

Browse files
authored
Merge pull request #4295 from batamig/graph-api
MDA Graph API
2 parents e2f35c2 + 40a3499 commit 1d3b68d

File tree

3 files changed

+206
-96
lines changed

3 files changed

+206
-96
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: Work with discovered apps via Graph API | Microsoft Defender for Cloud Apps
3+
description: Learn how to work with apps discovered by Microsoft Defender for Cloud Apps via Graph API.
4+
ms.topic: how-to #Don't change
5+
ms.date: 06/24/2024
6+
7+
#customer intent: As a security engineer, I want to work with discovered apps via API so that I can customize and automate the Microsoft Defender for Cloud Apps **Discovered apps** page functionality.
8+
9+
---
10+
11+
# Work with discovered apps via Graph API (Preview)
12+
13+
Microsoft Defender for Cloud Apps supports a Microsoft Graph API that you can use to work with discovered cloud apps, to customize and automate the **Discovered apps** page functionality in the Microsoft Defender portal.
14+
15+
This article provides sample procedures for using the [uploadedStreams API](/graph/api/security-datadiscoveryreport-list-uploadedstreams?view=graph-rest-beta) for common purposes.
16+
17+
## Prerequisites
18+
19+
Before you start using the Graph API, make sure to create an app and get an access token to use the application. Then, use the token to access the Defender for Cloud Apps API.
20+
21+
- Make sure to give the app permissions to access Defender for Cloud Apps, by granting it with `CloudApp-Discovery.Read.All` permissions and admin consent.
22+
23+
- Take note of your app secret and copy its value to use later on in your scripts.
24+
25+
You'll also need cloud app data streaming into Microsoft Defender for Cloud Apps.
26+
27+
For more information, see:
28+
29+
- [Manage admin access](manage-admins.md)
30+
- [Graph API authentication and authorization basics](/graph/auth/auth-concepts)
31+
- [Use the Microsoft Graph API](/graph/use-the-api)
32+
- [Set up Cloud Discovery](set-up-cloud-discovery.md)
33+
34+
## Get data about discovered apps
35+
36+
To get a high level summary of all the data available on your **Discovered apps** page, run the following GET command:
37+
38+
```http
39+
GET https://graph.microsoft.com/beta/dataDiscovery/cloudAppDiscovery/uploadedStreams
40+
```
41+
42+
To drill down to data for a specific stream:
43+
44+
1. Copy the relevant `<streamID>` value from the previous command's output.
45+
1. Run the following GET command using the `<streamID>` value:
46+
47+
```http
48+
GET https://graph.microsoft.com/beta/security/dataDiscovery/cloudAppDiscovery/uploadedStreams/<streamId>/aggregatedAppsDetails(period=duration'P90D')
49+
```
50+
51+
## Filter for a specific time period and risk score
52+
53+
Filter your API commands using `$select` and `$filter` to get data for a specific time period and risk score. For example, to view the names of all apps discovered in the last 30 days with a risk score lower or equal to 4, run:
54+
55+
```http
56+
GET https://graph.microsoft.com/beta/security/dataDiscovery/cloudAppDiscovery/uploadedStreams/<streamId>/aggregatedAppsDetails (period=duration'P30D')?$filter=riskRating  le 4 &$select=displayName
57+
```
58+
59+
## Get the userIdentifier of all users, devices, or IP addresses using a specific app
60+
61+
Identify the users, devices, or IP addresses that are currently using a specific app, run one of the following commands:
62+
63+
- **To return users**:
64+
65+
```http
66+
GET  https://graph.microsoft.com/beta/security/dataDiscovery/cloudAppDiscovery/uploadedStreams/<streamId>/aggregatedAppsDetails (period=duration'P30D')/ <id>/users
67+
```
68+
69+
- **To return IP addresses**:
70+
71+
```http
72+
GET  https://graph.microsoft.com/beta/security/dataDiscovery/cloudAppDiscovery/uploadedStreams/<streamId>/aggregatedAppsDetails (period=duration'P30D')/ <id>/ipAddress
73+
```
74+
75+
- **To return devices**:
76+
77+
```http
78+
GET  https://graph.microsoft.com/beta/security/dataDiscovery/cloudAppDiscovery/uploadedStreams/<streamId>/aggregatedAppsDetails (period=duration'P30D')/ <id>/name
79+
```
80+
81+
## Use filters to see apps by category
82+
83+
Use filters to see apps of a specific category, such as apps that are categorized as *Marketing*, and are also not HIPPA compliant. For example, run:
84+
85+
```http
86+
GET  https://graph.microsoft.com/beta/security/dataDiscovery/cloudAppDiscovery/uploadedStreams/<MDEstreamId>/aggregatedAppsDetails (period=duration 'P30D')?$filter= (appInfo/Hippa eq 'false') and category eq 'Marketing'
87+
```
88+
89+
## Related content
90+
91+
For more information, see [Working with discovered apps](discovered-apps.md) and the [Microsoft Graph API reference](/graph/api/resources/security-cloudappdiscovery-overview?view=graph-rest-beta).

CloudAppSecurityDocs/release-notes.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: What's new | Microsoft Defender for Cloud Apps
33
description: This article is updated frequently to let you know what's new in the latest release of Microsoft Defender for Cloud Apps.
4-
ms.date: 06/16/2024
4+
ms.date: 11/19/2024
55
ms.topic: overview
66
---
77

@@ -21,11 +21,21 @@ For news about earlier releases, see [Archive of past updates for Microsoft Defe
2121

2222
## November 2024
2323

24-
### SaaS Security initative in Exposure Management
25-
[Microsoft Security Exposure Management](https://learn.microsoft.com/security-exposure-management/) offers a focused, metric-driven way of tracking exposure in specific security areas using security [initiatives](https://learn.microsoft.com/security-exposure-management/initiatives). The "SaaS security initiative" provides a centralized location for all best practices related to SaaS security, categorized into 12 measurable metrics. These metrics are designed to assist in effectively managing and prioritizing the large number of security recommendations.
24+
### Defender for Cloud Apps support for Graph API (preview)
25+
26+
Defender for Cloud Apps customers can now query data about discovered apps via the Graph API. Use the Graph API to customize views and automate flows on the **Discovered apps** page, such as applying filters to view specific data. The API supports [GET](/graph/use-the-api) capabilities only.
27+
28+
For more information, see:
29+
30+
- [Work with discovered apps via Graph API](discovered-apps-api-graph.md)
31+
- [Microsoft Graph API reference for Microsoft Defender for Cloud Apps](/graph/api/resources/security-cloudappdiscovery-overview?view=graph-rest-beta)
32+
33+
### SaaS Security initiative in Exposure Management
34+
35+
[Microsoft Security Exposure Management](/security-exposure-management/) offers a focused, metric-driven way of tracking exposure in specific security areas using security [initiatives](/security-exposure-management/initiatives). The "SaaS security initiative" provides a centralized location for all best practices related to SaaS security, categorized into 12 measurable metrics. These metrics are designed to assist in effectively managing and prioritizing the large number of security recommendations.
2636
This capability is General Availability (Worldwide) - Note Microsoft Security Exposure Management data and capabilities are currently unavailable in U.S Government clouds - GCC, GCC High and DoD
2737

28-
For more information, see [SaaS security initiative](https://learn.microsoft.com/defender-cloud-apps/saas-security-initiative)![image](https://github.com/user-attachments/assets/356178e5-7b93-40e7-8210-e6d2e84d33b7)
38+
For more information, see [SaaS security initiative](saas-security-initiative.md).
2939

3040
### Visibility into app origin (Preview)
3141

@@ -52,12 +62,13 @@ Defender for Cloud Apps users who use app governance can now get granular insigh
5262
For more information, see [OAuth app data usage insights on app governance](/defender-cloud-apps/app-governance-visibility-insights-view-apps#getting-detailed-information-on-an-app).
5363

5464
## October 2024
65+
5566
### Internal Session Controls application notice
5667
The Enterprise application “Microsoft Defender for Cloud Apps – Session Controls” is used internally by the Conditional Access App Control service.
5768
Please ensure there is no CA policy restricting access to this application.
5869
For policies that restrict all or certain applications, please ensure this application is listed as an exception or confirm that the blocking policy is deliberate.
5970

60-
For more information, see [Sample: Create Microsoft Entra ID Conditional Access policies for use with Defender for Cloud Apps](https://learn.microsoft.com/defender-cloud-apps/session-policy-aad#sample-create-microsoft-entra-id-conditional-access-policies-for-use-with-defender-for-cloud-apps).
71+
For more information, see [Sample: Create Microsoft Entra ID Conditional Access policies for use with Defender for Cloud Apps](session-policy-aad.md#sample-create-microsoft-entra-id-conditional-access-policies-for-use-with-defender-for-cloud-apps).
6172

6273
### New anomaly data in advanced hunting CloudAppEvents table
6374

@@ -81,9 +92,8 @@ Using _OAuthAppId_ allows the queries that consider specific OAuth applications,
8192

8293
For more information, see [Advanced Hunting "CloudAppEvents" Data schema](/microsoft-365/security/defender/advanced-hunting-cloudappevents-table).
8394

84-
## September 2024
85-
8695
### Enforce Edge in-browser when accessing business apps
96+
8797
Administrators who understand the power of Edge in-browser protection, can now require their users to use Edge when accessing corporate resources.
8898

8999
A primary reason is security, since the barrier to circumventing session controls using Edge is much higher than with reverse proxy technology.
@@ -101,6 +111,7 @@ For more information, see:
101111
- [Connect apps to get visibility and control with Microsoft Defender for Cloud Apps](enable-instant-visibility-protection-and-governance-actions-for-your-apps.md)
102112
- [Mural Help Center](https://support.mural.co/s/)
103113

114+
104115
### Removing the ability to email end users about blocked actions
105116

106117
Effective October 1st, 2024, we will discontinue the feature that notifies end users via email when their action is blocked by session policies.
@@ -113,7 +124,7 @@ Existing session policies with this setting will not trigger email notifications
113124

114125
End users will continue to receive the block message directly through the browser and will stop receiving block notification via email.
115126

116-
Screenshot of the notify end user by email option:
127+
For example:
117128

118129
![Screenshot of how to block notifying end user by email.](media/release-notes/notify-end-user-by-email.png)
119130

@@ -146,9 +157,11 @@ For more information, see [Configure custom URL for MDA block pages](mde-govern
146157

147158

148159
### In-browser protection for macOS users and newly supported policies (Preview)
149-
Edge browser users from macOS, scoped to session policies, are now protected with in-browser protection.
160+
161+
Edge browser users from macOS who are scoped to session policies are now protected with in-browser protection.
150162

151163
The following session policies are now supported:
164+
152165
- Block and Monitor upload of sensitive files
153166
- Block and Monitor paste
154167
- Block and Monitor of malware upload

CloudAppSecurityDocs/toc.yml

Lines changed: 93 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ items:
194194
href: discovered-app-queries.md
195195
- name: Discover and manage shadow IT
196196
href: tutorial-shadow-it.md
197+
- name: Work with discovered apps via API
198+
href: discovered-apps-api-graph.md
197199
- name: Posture management (SSPM)
198200
items:
199201
- name: Overview
@@ -434,98 +436,102 @@ items:
434436
href: ops-guide/ops-guide-monthly.md
435437
- name: Ad-hoc activities
436438
href: ops-guide/ops-guide-ad-hoc.md
437-
- name: REST API
439+
- name: Reference
438440
items:
439-
- name: Introduction
440-
href: api-introduction.md
441-
- name: Authentication
441+
- name: Microsoft Graph API reference
442+
href: /graph/api/resources/security-cloudappdiscovery-overview?view=graph-rest-beta
443+
- name: REST API reference
442444
items:
443-
- name: Managing API tokens
444-
href: api-authentication.md
445-
- name: Application context
446-
href: api-authentication-application.md
447-
- name: User context
448-
href: api-authentication-user.md
449-
- name: Legacy method
450-
href: api-tokens-legacy.md
451-
- name: Activities
452-
items:
453-
- name: Overview
454-
href: api-activities.md
455-
- name: Investigate activities with APIs
456-
href: api-activities-investigate-script.md
457-
- name: List activities
458-
href: api-activities-list.md
459-
- name: Fetch activity
460-
href: api-activities-fetch.md
461-
- name: Feedback on activity
462-
href: api-activities-feedback.md
463-
- name: Alerts
464-
items:
465-
- name: Overview
466-
href: api-alerts.md
467-
- name: List alerts
468-
href: api-alerts-list.md
469-
- name: Close benign
470-
href: api-alerts-close-benign.md
471-
- name: Close false positive
472-
href: api-alerts-close-false-positive.md
473-
- name: Close true positive
474-
href: api-alerts-close-true-positive.md
475-
- name: Fetch alert
476-
href: api-alerts-fetch.md
477-
- name: Mark alert as read
478-
href: api-alerts-mark-read.md
479-
- name: Mark alert as unread
480-
href: api-alerts-mark-unread.md
481-
- name: Cloud Discovery
482-
items:
483-
- name: Overview
484-
href: api-discovery.md
485-
- name: Initiate file upload
486-
href: api-discovery-initiate.md
487-
- name: Perform file upload
488-
href: api-discovery-perform.md
489-
- name: Finalize file upload
490-
href: api-discovery-finalize.md
491-
- name: List continuous reports
492-
href: api-discovery-list-streams.md
493-
- name: List continuous report categories
494-
href: api-discovery-list-categories.md
495-
- name: Generate block script
496-
href: api-discovery-script.md
497-
- name: Data Enrichment
498-
items:
499-
- name: Overview
500-
href: api-data-enrichment.md
501-
- name: Manage IP address ranges using the API
502-
href: api-data-enrichment-manage-script.md
503-
- name: List IP ranges
504-
href: api-data-enrichment-list.md
505-
- name: Create IP address range
506-
href: api-data-enrichment-create.md
507-
- name: Update IP address range
508-
href: api-data-enrichment-update.md
509-
- name: Delete IP address range
510-
href: api-data-enrichment-delete.md
511-
- name: Entities
445+
- name: Introduction
446+
href: api-introduction.md
447+
- name: Authentication
512448
items:
513-
- name: Overview
514-
href: api-entities.md
515-
- name: List entities
516-
href: api-entities-list.md
517-
- name: Fetch entity
518-
href: api-entities-fetch.md
519-
- name: Fetch entity tree
520-
href: api-entities-fetch-tree.md
521-
- name: Files
449+
- name: Managing API tokens
450+
href: api-authentication.md
451+
- name: Application context
452+
href: api-authentication-application.md
453+
- name: User context
454+
href: api-authentication-user.md
455+
- name: Legacy method
456+
href: api-tokens-legacy.md
457+
- name: Activities
522458
items:
523459
- name: Overview
524-
href: api-files.md
525-
- name: List Files
526-
href: api-files-list.md
527-
- name: Fetch File
528-
href: api-files-fetch.md
460+
href: api-activities.md
461+
- name: Investigate activities with APIs
462+
href: api-activities-investigate-script.md
463+
- name: List activities
464+
href: api-activities-list.md
465+
- name: Fetch activity
466+
href: api-activities-fetch.md
467+
- name: Feedback on activity
468+
href: api-activities-feedback.md
469+
- name: Alerts
470+
items:
471+
- name: Overview
472+
href: api-alerts.md
473+
- name: List alerts
474+
href: api-alerts-list.md
475+
- name: Close benign
476+
href: api-alerts-close-benign.md
477+
- name: Close false positive
478+
href: api-alerts-close-false-positive.md
479+
- name: Close true positive
480+
href: api-alerts-close-true-positive.md
481+
- name: Fetch alert
482+
href: api-alerts-fetch.md
483+
- name: Mark alert as read
484+
href: api-alerts-mark-read.md
485+
- name: Mark alert as unread
486+
href: api-alerts-mark-unread.md
487+
- name: Cloud Discovery
488+
items:
489+
- name: Overview
490+
href: api-discovery.md
491+
- name: Initiate file upload
492+
href: api-discovery-initiate.md
493+
- name: Perform file upload
494+
href: api-discovery-perform.md
495+
- name: Finalize file upload
496+
href: api-discovery-finalize.md
497+
- name: List continuous reports
498+
href: api-discovery-list-streams.md
499+
- name: List continuous report categories
500+
href: api-discovery-list-categories.md
501+
- name: Generate block script
502+
href: api-discovery-script.md
503+
- name: Data Enrichment
504+
items:
505+
- name: Overview
506+
href: api-data-enrichment.md
507+
- name: Manage IP address ranges using the API
508+
href: api-data-enrichment-manage-script.md
509+
- name: List IP ranges
510+
href: api-data-enrichment-list.md
511+
- name: Create IP address range
512+
href: api-data-enrichment-create.md
513+
- name: Update IP address range
514+
href: api-data-enrichment-update.md
515+
- name: Delete IP address range
516+
href: api-data-enrichment-delete.md
517+
- name: Entities
518+
items:
519+
- name: Overview
520+
href: api-entities.md
521+
- name: List entities
522+
href: api-entities-list.md
523+
- name: Fetch entity
524+
href: api-entities-fetch.md
525+
- name: Fetch entity tree
526+
href: api-entities-fetch-tree.md
527+
- name: Files
528+
items:
529+
- name: Overview
530+
href: api-files.md
531+
- name: List Files
532+
href: api-files-list.md
533+
- name: Fetch File
534+
href: api-files-fetch.md
529535
- name: Resources
530536
items:
531537
- name: Licensing datasheet

0 commit comments

Comments
 (0)