Skip to content

Commit

Permalink
MCAS
Browse files Browse the repository at this point in the history
  • Loading branch information
directorcia committed Oct 7, 2019
1 parent 8440f80 commit 30f96cd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
37 changes: 37 additions & 0 deletions o365-mcas-api.ps1
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"
1 change: 0 additions & 1 deletion text-colour.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Clear-Host

write-host -foregroundcolor $systemmessagecolor "Script started`n"


foreach ($bgcount in $bg) {
Foreach ($fgcount in $fg) {
Write-host "Foreground =", $fgcount, "/ Background =", $bgcount
Expand Down

0 comments on commit 30f96cd

Please sign in to comment.