-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
- Loading branch information
Showing
109 changed files
with
2,074 additions
and
900 deletions.
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,30 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy Powershell project to Azure Function App - cippkkxvm | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
|
||
jobs: | ||
deploy: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'cippkkxvm' | ||
slot-name: 'Production' | ||
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_171C3E2B1E2346AAA333905DFCA62F2D }} |
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,30 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy Powershell project to Azure Function App - cippkwn4s-auditlog | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
|
||
jobs: | ||
deploy: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'cippkwn4s-auditlog' | ||
slot-name: 'Production' | ||
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_4CBFBE8BE62240D789C371767B49278E }} |
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,30 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Build and deploy Powershell project to Azure Function App - cipplwwww-proc | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
workflow_dispatch: | ||
|
||
env: | ||
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root | ||
|
||
jobs: | ||
deploy: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: 'Checkout GitHub Action' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Run Azure Functions Action' | ||
uses: Azure/functions-action@v1 | ||
id: fa | ||
with: | ||
app-name: 'cipplwwww-proc' | ||
slot-name: 'Production' | ||
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} | ||
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_B8CE64E970E74E6AB2D6655823D95B1A }} |
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
[ | ||
{ | ||
"resourceAppId": "00000003-0000-0ff1-ce00-000000000000", | ||
"resourceAccess": [{ "id": "AllProfiles.Manage", "type": "Scope" }] | ||
"resourceAppId": "00000006-0000-0ff1-ce00-000000000000", | ||
"resourceAccess": [ | ||
{ | ||
"id": "M365AdminPortal.IntegratedApps.ReadWrite", | ||
"type": "Scope" | ||
}, | ||
{ | ||
"id": "user_impersonation", | ||
"type": "Scope" | ||
} | ||
] | ||
}, | ||
{ | ||
"resourceAppId": "00000006-0000-0ff1-ce00-000000000000", | ||
"resourceAppId": "00000003-0000-0ff1-ce00-000000000000", | ||
"resourceAccess": [ | ||
{ "id": "M365AdminPortal.IntegratedApps.ReadWrite", "type": "Scope" }, | ||
{ "id": "user_impersonation", "type": "Scope" } | ||
{ | ||
"id": "AllProfiles.Manage", | ||
"type": "Scope" | ||
} | ||
] | ||
} | ||
] | ||
] |
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
23 changes: 23 additions & 0 deletions
23
Modules/CIPPCore/Public/AuditLogs/Get-CippAuditLogSearchResults.ps1
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,23 @@ | ||
function Get-CippAuditLogSearchResults { | ||
<# | ||
.SYNOPSIS | ||
Get the results of an audit log search | ||
.DESCRIPTION | ||
Get the results of an audit log search from the Graph API | ||
.PARAMETER TenantFilter | ||
The tenant to filter on. | ||
.PARAMETER QueryId | ||
The ID of the query to get the results for. | ||
#> | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$TenantFilter, | ||
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)] | ||
[Alias('id')] | ||
[string]$QueryId | ||
) | ||
|
||
process { | ||
New-GraphGetRequest -uri ('https://graph.microsoft.com/beta/security/auditLog/queries/{0}/records?$top=999' -f $QueryId) -AsApp $true -tenantid $TenantFilter | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Modules/CIPPCore/Public/AuditLogs/Get-CippAuditLogSearches.ps1
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,23 @@ | ||
function Get-CippAuditLogSearches { | ||
<# | ||
.SYNOPSIS | ||
Get the available audit log searches | ||
.DESCRIPTION | ||
Query the Graph API for available audit log searches. | ||
.PARAMETER TenantFilter | ||
The tenant to filter on. | ||
#> | ||
param ( | ||
[Parameter(Mandatory = $true)] | ||
[string]$TenantFilter, | ||
[Parameter()] | ||
[switch]$ReadyToProcess | ||
) | ||
$Queries = New-GraphGetRequest -uri 'https://graph.microsoft.com/beta/security/auditLog/queries' -AsApp $true -tenantid $TenantFilter | ||
if ($ReadyToProcess.IsPresent) { | ||
$AuditLogSearchesTable = Get-CippTable -TableName 'AuditLogSearches' | ||
$PendingQueries = Get-CIPPAzDataTableEntity @AuditLogSearchesTable -Filter "Tenant eq '$TenantFilter' and CippStatus eq 'Pending'" | ||
$Queries = $Queries | Where-Object { $PendingQueries.RowKey -contains $_.id -and $_.status -eq 'succeeded' } | ||
} | ||
return $Queries | ||
} |
Oops, something went wrong.