forked from directorcia/Office365
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8440f80
commit 30f96cd
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<# CIAOPS | ||
Script provided as is. Use at own risk. No guarantees or warranty provided. | ||
Description - Get data from Microsoft Cloud App Security | ||
Source - | ||
Prerequisites = 1 | ||
1. Create an API Token in your tenant via - | ||
More scripts available by joining http://www.ciaopspatron.com | ||
#> | ||
|
||
## Variables | ||
$systemmessagecolor = "cyan" | ||
$processmessagecolor = "green" | ||
|
||
Clear-Host | ||
|
||
write-host -foregroundcolor $systemmessagecolor "Script started`n" | ||
|
||
$mcasuri = "<your MCAS URI here>" ## This MUST be changed before the script will run correctly | ||
$mcastoken = "your MCAS Token here" ## This MUST be changed before the script will run correctly | ||
|
||
$endpoint = "alerts" | ||
|
||
$response = Invoke-RestMethod ` | ||
-uri "$mcasuri/api/v1/$endpoint/" ` | ||
-headers @{authorization = "Token $mcastoken" } ` | ||
-method POST ` | ||
-body ($body | convertto-json -depth 2) ` | ||
-verbose | ||
|
||
$response.data | ||
|
||
write-host -foregroundcolor $systemmessagecolor "`nScript Completed`n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters