Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
8fbe5c4
Update identity-openapispec.json
TecharyJames Jan 16, 2026
9969b9f
feat(named-locations): support removing multiple IPs and locations
kris6673 Jan 21, 2026
16a6a11
feat(named-locations): support removing multiple IPs and locations
kris6673 Jan 21, 2026
2cd5043
Merge branch 'named-locations' of https://github.com/kris6673/CIPP-AP…
kris6673 Jan 21, 2026
96db476
roll back memory exception testing
JohnDuprey Jan 22, 2026
67df08f
Optimize service principal and permission grants with bulk requests
JohnDuprey Jan 22, 2026
5b9007c
Improve logging and response structure in core modules
JohnDuprey Jan 22, 2026
c17f29e
chore: sync product names in ExcludeSkuList.JSON
kris6673 Jan 22, 2026
dc6c7e7
Make version better available on azure function app interaction
Jan 23, 2026
22f6c8e
Merge pull request #1784 from kris6673/named-locations
KelvinTegelaar Jan 23, 2026
3929058
Merge pull request #1789 from kris6673/exclude-list
KelvinTegelaar Jan 23, 2026
9b7e995
Refactor Add-CIPPDbItem for pipeline streaming and batch efficiency
JohnDuprey Jan 23, 2026
5287714
Remove debug and timing logs from Add-CIPPAzDataTableEntity and Add-C…
JohnDuprey Jan 23, 2026
a16affb
Enhance error handling and info retrieval in core modules
JohnDuprey Jan 25, 2026
1177ffd
Add dynamic redirect URI update for application
JohnDuprey Jan 25, 2026
185c026
Add error handling for redirect URI update in ExecListAppId
JohnDuprey Jan 25, 2026
f153a18
Update Invoke-ExecListAppId.ps1
JohnDuprey Jan 25, 2026
3cbaf96
Optimize tenant info retrieval and trigger CPV refresh
JohnDuprey Jan 25, 2026
09d5c7b
Update success message after adding tenant
JohnDuprey Jan 25, 2026
2b5360e
Set refresh token as environment variable after update
JohnDuprey Jan 25, 2026
82655b3
Add Force switch to Get-CIPPAuthentication
JohnDuprey Jan 25, 2026
68dadd8
Trigger CPV refresh for partner tenant after token update
JohnDuprey Jan 25, 2026
d7bbf29
fix sort
JohnDuprey Jan 26, 2026
412b97e
Added standard to enable windows diagnostic data settings in Intune
ngms-psh Jan 27, 2026
db3ce77
Invoke-ListExtensionsConfig failed to run if table is empty
ngms-psh Jan 27, 2026
ca4a776
Merge pull request #1791 from ngms-psh/feat-intuneWindowsDiagData
KelvinTegelaar Jan 27, 2026
7d9d899
Oops, I forgot to remove some debug output lines
ngms-psh Jan 27, 2026
a8f40fe
Merge branch 'KelvinTegelaar:master' into feat-intuneWindowsDiagData
ngms-psh Jan 27, 2026
2e51ba5
Refactor direct tenant secret loading for efficiency
JohnDuprey Jan 27, 2026
f5b2783
Return status object on test function failure
JohnDuprey Jan 28, 2026
f144e1c
Yeet Write-Hosts
Jan 28, 2026
b833347
Remove use of foreach-object from standards
Jan 28, 2026
88eddb9
Replace foreach New-ExoRequest with New-ExoBulkRequest
Jan 28, 2026
7eab604
Fix BannedWordsList count logic
Jan 28, 2026
f967388
Fix duplicate exo data retrieval in Invoke-CIPPStandardMalwareFilterP…
Jan 28, 2026
0fe392d
Fix duplicate exo data retrieval in Invoke-CIPPStandardSafeAttachment…
Jan 28, 2026
d14d72d
Fix duplicate exo data retrieval for Invoke-CIPPStandardSafeLinksPolicy
Jan 28, 2026
1873448
Fix duplicate exo data retrieval in Invoke-CIPPStandardAntiPhishPolicy
Jan 28, 2026
af0b19c
Use cached capability data instead of making a new call
Jan 28, 2026
3dee3dc
Remove redundant select-object usage
Jan 28, 2026
133df3f
Batch graph disable guests
Jan 28, 2026
19315cc
Optimize retrieval of potentially large graph data sets
Jan 28, 2026
03229d6
Add missing license checks to prevent impossible runs
Jan 28, 2026
0321247
Sequential contact processing likely provides sufficient natural prop…
Jan 28, 2026
45bf2dc
New-GraphBulkRequest
Jan 28, 2026
919bdfc
New-GraphBulkRequest
Jan 28, 2026
1647d3a
Project root cleanup
Jan 28, 2026
383c907
root cleanup
Jan 28, 2026
a1f755e
Clean up obsolete location switches
Jan 28, 2026
46cf0c1
clean up root
Jan 28, 2026
bf37b8d
gitignore all ps1 files except profile.ps1. Messy bastards.
Jan 28, 2026
ad98672
Update log messages for new tenant onboarding
JohnDuprey Jan 28, 2026
06852a2
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
JohnDuprey Jan 28, 2026
7751426
Refactor test orchestration to per-tenant lists
JohnDuprey Jan 28, 2026
c3187cf
Standards: replace users graph calls with cippdb
Jan 28, 2026
6a26ba5
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
Jan 28, 2026
64740a9
Standards: replace servicePrincipals graph call with cippdb
Jan 28, 2026
3185d0b
feat: add new calendar properties to room functions
kris6673 Jan 28, 2026
404f5fb
feat: enhance inactive user alert functionality
kris6673 Jan 28, 2026
9915618
Standards: replace exo mailboxstats with DB
Jan 28, 2026
8655997
Merge pull request #1794 from kris6673/issue5273
KelvinTegelaar Jan 29, 2026
b68ed22
Merge pull request #1793 from kris6673/room-options
KelvinTegelaar Jan 29, 2026
29be6ac
Merge pull request #1792 from ngms-psh/feat-intuneWindowsDiagData
KelvinTegelaar Jan 29, 2026
3a3d378
Limit params on Search-CIPPDbData
Jan 29, 2026
397ae25
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
Jan 29, 2026
3356196
remove quad9 as valid resolved
KelvinTegelaar Jan 29, 2026
4875b28
Update Get-CIPPAlertSmtpAuthSuccess.ps1
TecharyJames Jan 29, 2026
46eeb04
Revert "Update identity-openapispec.json"
TecharyJames Jan 29, 2026
dd14fa7
performance improvements for securescore
KelvinTegelaar Jan 29, 2026
8d76ec6
line breaks
KelvinTegelaar Jan 29, 2026
e42e92a
DNSHealth: bump to 1.1.2 and update providers/logic
JohnDuprey Jan 29, 2026
5baa057
clean up legacy stuff around intune template management.
KelvinTegelaar Jan 29, 2026
d3f15c0
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Jan 29, 2026
74e95ee
Fix Intune Standards rerun prevention/filtering
KelvinTegelaar Jan 29, 2026
4bc0143
add some logging
KelvinTegelaar Jan 29, 2026
4461f55
add "INTUNETEMPLATERUN" as AppInsights tracker.
KelvinTegelaar Jan 29, 2026
2d1e866
Merge pull request #1795 from TecharyJames/master
KelvinTegelaar Jan 29, 2026
d33efc4
revert timer
JohnDuprey Jan 29, 2026
f960820
Bump version to 10.0.6
JohnDuprey Jan 29, 2026
cb45ce7
Merge pull request #1797 from KelvinTegelaar/dev
JohnDuprey Jan 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ yarn.lock

# Cursor IDE
.cursor/rules

# Ignore all root PowerShell files except profile.ps1
/*.ps1
!/profile.ps1
814 changes: 0 additions & 814 deletions CIPP-Permissions.json

This file was deleted.

20 changes: 12 additions & 8 deletions Config/ExcludeSkuList.JSON
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
},
{
"GUID": "f30db892-07e9-47e9-837c-80727f46fd3d",
"Product_Display_Name": "MICROSOFT FLOW FREE"
"Product_Display_Name": "Microsoft Power Automate Free"
},
{
"GUID": "16ddbbfc-09ea-4de2-b1d7-312db6112d70",
"Product_Display_Name": "MICROSOFT TEAMS (FREE)"
"Product_Display_Name": "Microsoft Teams (Free)"
},
{
"GUID": "a403ebcc-fae0-4ca2-8c8c-7a907fd6c235",
"Product_Display_Name": "Power BI (free)"
"Product_Display_Name": "Microsoft Fabric (Free)"
},
{
"GUID": "61e6bd70-fbdb-4deb-82ea-912842f39431",
Expand All @@ -25,7 +25,7 @@
},
{
"GUID": "338148b6-1b11-4102-afb9-f92b6cdc0f8d",
"Product_Display_Name": "DYNAMICS 365 P1 TRIAL FOR INFORMATION WORKERS"
"Product_Display_Name": "Dynamics 365 P1 Tria for Information Workers"
},
{
"GUID": "fcecd1f9-a91e-488d-a918-a96cdb6ce2b0",
Expand All @@ -41,19 +41,19 @@
},
{
"GUID": "606b54a9-78d8-4298-ad8b-df6ef4481c80",
"Product_Display_Name": "Power Virtual Agents Viral Trial"
"Product_Display_Name": "Microsoft Copilot Studio Viral Trial"
},
{
"GUID": "1f2f344a-700d-42c9-9427-5cea1d5d7ba6",
"Product_Display_Name": "MICROSOFT STREAM"
"Product_Display_Name": "Microsoft Stream"
},
{
"GUID": "6470687e-a428-4b7a-bef2-8a291ad947c9",
"Product_Display_Name": "WINDOWS STORE FOR BUSINESS"
"Product_Display_Name": "Windows Store for Business"
},
{
"GUID": "710779e8-3d4a-4c88-adb9-386c958d1fdf",
"Product_Display_Name": "MICROSOFT TEAMS EXPLORATORY"
"Product_Display_Name": "Microsoft Teams Exploratory"
},
{
"GUID": "8c4ce438-32a7-4ac5-91a6-e22ae08d9c8b",
Expand Down Expand Up @@ -94,5 +94,9 @@
{
"GUID": "99049c9c-6011-4908-bf17-15f496e6519d",
"Product_Display_Name": "Office 365 Extra File Storage"
},
{
"GUID": "47794cd0-f0e5-45c5-9033-2eb6b5fc84e0",
"Product_Display_Name": "Communications Credits"
}
]
97 changes: 78 additions & 19 deletions Modules/CIPPCore/Public/Add-CIPPApplicationPermission.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ function Add-CIPPApplicationPermission {
$TenantFilter
)
if ($ApplicationId -eq $env:ApplicationID -and $TenantFilter -eq $env:TenantID) {
#return @('Cannot modify application permissions for CIPP-SAM on partner tenant')
$RequiredResourceAccess = 'CIPPDefaults'
}
Set-Location (Get-Item $PSScriptRoot).FullName
if ($RequiredResourceAccess -eq 'CIPPDefaults') {
#$RequiredResourceAccess = (Get-Content '.\SAMManifest.json' | ConvertFrom-Json).requiredResourceAccess

$Permissions = Get-CippSamPermissions -NoDiff
$RequiredResourceAccess = [System.Collections.Generic.List[object]]::new()
Expand Down Expand Up @@ -59,33 +56,72 @@ function Add-CIPPApplicationPermission {
}
}

Write-Information "Adding application permissions to application $ApplicationId in tenant $TenantFilter"

$ServicePrincipalList = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/servicePrincipals?`$select=AppId,id,displayName&`$top=999" -skipTokenCache $true -tenantid $TenantFilter -NoAuthCheck $true
$ServicePrincipalList = [System.Collections.Generic.List[object]]::new()
$SPList = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/servicePrincipals?`$select=AppId,id,displayName&`$top=999" -skipTokenCache $true -tenantid $TenantFilter -NoAuthCheck $true
foreach ($SP in $SPList) { $ServicePrincipalList.Add($SP) }
$ourSVCPrincipal = $ServicePrincipalList | Where-Object -Property AppId -EQ $ApplicationId
if (!$ourSVCPrincipal) {
#Our Service Principal isn't available yet. We do a sleep and reexecute after 3 seconds.
Start-Sleep -Seconds 5
$ServicePrincipalList = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/servicePrincipals?`$select=AppId,id,displayName&`$top=999" -skipTokenCache $true -tenantid $TenantFilter -NoAuthCheck $true
$ServicePrincipalList.Clear()
$SPList = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/servicePrincipals?`$select=AppId,id,displayName&`$top=999" -skipTokenCache $true -tenantid $TenantFilter -NoAuthCheck $true
foreach ($SP in $SPList) { $ServicePrincipalList.Add($SP) }
$ourSVCPrincipal = $ServicePrincipalList | Where-Object -Property AppId -EQ $ApplicationId
}

$Results = [System.Collections.Generic.List[string]]::new()

$CurrentRoles = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/servicePrincipals/$($ourSVCPrincipal.id)/appRoleAssignments" -tenantid $TenantFilter -skipTokenCache $true -NoAuthCheck $true

$Grants = foreach ($App in $RequiredResourceAccess) {
# Collect missing service principals and prepare bulk request
$MissingServicePrincipals = [System.Collections.Generic.List[object]]::new()
$AppIdToRequestId = @{}
$requestId = 1

foreach ($App in $RequiredResourceAccess) {
$svcPrincipalId = $ServicePrincipalList | Where-Object -Property AppId -EQ $App.resourceAppId
if (!$svcPrincipalId) {
try {
$Body = @{
appId = $App.resourceAppId
} | ConvertTo-Json -Compress
$svcPrincipalId = New-GraphPOSTRequest -uri 'https://graph.microsoft.com/beta/servicePrincipals' -tenantid $TenantFilter -body $Body -type POST
} catch {
$Results.add("Failed to create service principal for $($App.resourceAppId): $(Get-NormalizedError -message $_.Exception.Message)")
continue
$Body = @{
appId = $App.resourceAppId
}
$MissingServicePrincipals.Add(@{
id = $requestId.ToString()
method = 'POST'
url = '/servicePrincipals'
headers = @{
'Content-Type' = 'application/json'
}
body = $Body
})
$AppIdToRequestId[$App.resourceAppId] = $requestId.ToString()
$requestId++
}
}

# Create missing service principals in bulk
if ($MissingServicePrincipals.Count -gt 0) {
try {
$BulkResults = New-GraphBulkRequest -Requests $MissingServicePrincipals -tenantid $TenantFilter -NoAuthCheck $true
foreach ($Result in $BulkResults) {
if ($Result.status -eq 201) {
$ServicePrincipalList.Add($Result.body)
} else {
$AppId = ($MissingServicePrincipals | Where-Object { $_.id -eq $Result.id }).body.appId
$Results.add("Failed to create service principal for $($AppId): $($Result.body.error.message)")
}
}
} catch {
$Results.add("Failed to create service principals in bulk: $(Get-NormalizedError -message $_.Exception.Message)")
}
}

# Build grants list
$Grants = foreach ($App in $RequiredResourceAccess) {
$svcPrincipalId = $ServicePrincipalList | Where-Object -Property AppId -EQ $App.resourceAppId
if (!$svcPrincipalId) { continue }

foreach ($SingleResource in $App.ResourceAccess | Where-Object -Property Type -EQ 'Role') {
if ($SingleResource.id -in $CurrentRoles.appRoleId) { continue }
[pscustomobject]@{
Expand All @@ -95,14 +131,37 @@ function Add-CIPPApplicationPermission {
}
}
}

# Apply grants in bulk
$counter = 0
foreach ($Grant in $Grants) {
if ($Grants.Count -gt 0) {
$GrantRequests = [System.Collections.Generic.List[object]]::new()
$requestId = 1
foreach ($Grant in $Grants) {
$GrantRequests.Add(@{
id = $requestId.ToString()
method = 'POST'
url = "/servicePrincipals/$($ourSVCPrincipal.id)/appRoleAssignedTo"
headers = @{
'Content-Type' = 'application/json'
}
body = $Grant
})
$requestId++
}

try {
$SettingsRequest = New-GraphPOSTRequest -body (ConvertTo-Json -InputObject $Grant -Depth 5) -uri "https://graph.microsoft.com/beta/servicePrincipals/$($ourSVCPrincipal.id)/appRoleAssignedTo" -tenantid $TenantFilter -type POST -NoAuthCheck $true
$counter++
$BulkResults = New-GraphBulkRequest -Requests $GrantRequests -tenantid $TenantFilter -NoAuthCheck $true
foreach ($Result in $BulkResults) {
if ($Result.status -eq 201) {
$counter++
} else {
$GrantRequest = $GrantRequests | Where-Object { $_.id -eq $Result.id }
$Results.add("Failed to grant $($GrantRequest.body.appRoleId) to $($GrantRequest.body.resourceId): $($Result.body.error.message)")
}
}
} catch {
$ErrorMessage = Get-NormalizedError -Message $_.Exception.Message
$Results.add("Failed to grant $($Grant.appRoleId) to $($Grant.resourceId): $ErrorMessage")
$Results.add("Failed to grant permissions in bulk: $(Get-NormalizedError -message $_.Exception.Message)")
}
}
"Added $counter Application permissions to $($ourSVCPrincipal.displayName)"
Expand Down
Loading