Skip to content

Commit e476532

Browse files
Merge branch 'KelvinTegelaar:master' into master
2 parents 2270c62 + c7216ab commit e476532

193 files changed

Lines changed: 8118 additions & 1077 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy Powershell project to Azure Function App - cippckdtz
4+
name: Build and deploy Powershell project to Azure Function App - cipp4i6t3
55

66
on:
77
push:
@@ -24,7 +24,7 @@ jobs:
2424
uses: Azure/functions-action@v1
2525
id: fa
2626
with:
27-
app-name: 'cippckdtz'
27+
app-name: 'cipp4i6t3'
2828
slot-name: 'Production'
2929
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_726578DA8A7243BF9D82FE123C2F6E7F }}
30+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_9D257A31ACA24925A112AF5FFC2BEAFE }}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy Powershell project to Azure Function App - cippacnqv
4+
name: Build and deploy Powershell project to Azure Function App - cippkwn4s
55

66
on:
77
push:
@@ -23,17 +23,17 @@ jobs:
2323
uses: actions/checkout@v4
2424

2525
- name: Login to Azure
26-
uses: azure/login@v1
26+
uses: azure/login@v2
2727
with:
28-
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_6085081ED1124B799258E9FF743FF4B9 }}
29-
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_9BDB2DDBFAFA4BC19C20A58B204BFAF3 }}
30-
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_02B5224812794971B05EDD557AF2B867 }}
28+
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_B6BCC8886F40482FB8B43907FCDA6596 }}
29+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_0D1C65B9099F48FABDF7F7052EA6887F }}
30+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_76518AE5ECB34375A414DEEE1119C161 }}
3131

3232
- name: 'Run Azure Functions Action'
3333
uses: Azure/functions-action@v1
3434
id: fa
3535
with:
36-
app-name: 'cippacnqv'
36+
app-name: 'cippkwn4s'
3737
slot-name: 'Production'
3838
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
3939

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy Powershell project to Azure Function App - cippz6s4d
4+
name: Build and deploy Powershell project to Azure Function App - cipplwwww
55

66
on:
77
push:
@@ -24,7 +24,7 @@ jobs:
2424
uses: Azure/functions-action@v1
2525
id: fa
2626
with:
27-
app-name: 'cippz6s4d'
27+
app-name: 'cipplwwww'
2828
slot-name: 'Production'
2929
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
30-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D27E7CF0887F4E4591F3957CCA96F0FD }}
30+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_00A9A6DFE9244C2EA8952190FFF10F45 }}
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
22
# More GitHub Actions for Azure: https://github.com/Azure/actions
33

4-
name: Build and deploy Powershell project to Azure Function App - cipppwrro
4+
name: Build and deploy Powershell project to Azure Function App - cippwuxwa
55

66
on:
77
push:
88
branches:
9-
- dev
9+
- master
1010
workflow_dispatch:
1111

1212
env:
1313
AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
1414

1515
jobs:
16-
build-and-deploy:
16+
deploy:
1717
runs-on: windows-latest
18+
1819
steps:
1920
- name: 'Checkout GitHub Action'
20-
uses: actions/checkout@v2
21-
21+
uses: actions/checkout@v4
22+
2223
- name: 'Run Azure Functions Action'
2324
uses: Azure/functions-action@v1
2425
id: fa
2526
with:
26-
app-name: 'cipppwrro'
27+
app-name: 'cippwuxwa'
2728
slot-name: 'Production'
2829
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
29-
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_9E109464904540339CA94F283ACE1312 }}
30+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_1FC84D1E2F0943369990DCD13A4AEB3A }}

.github/workflows/ninjaone_cipp426ns.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

Config/SharePoint.BPATemplate.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131
},
3232
{
3333
"name": "Resharing by external users",
34-
"value": "isResharingByExternalUsersEnabled",
35-
"formatter": "reverseBool"
34+
"value": "SharepointSettings.isResharingByExternalUsersEnabled",
35+
"formatter": "bool"
3636
},
3737
{
3838
"name": "Allow users to sync from unmanaged devices",
3939
"value": "SharepointSettings.isUnmanagedSyncAppForTenantRestricted",
40-
"formatter": "bool"
40+
"formatter": "reverseBool"
4141
},
4242
{
43-
"name": "Site creation by standards users enabled",
43+
"name": "Site creation by standard users enabled",
4444
"value": "SharepointSettings.isSiteCreationEnabled",
45-
"formatter": "reverseBool"
45+
"formatter": "bool"
4646
},
4747
{
4848
"name": "Deleted user data rention(days)",

Config/standards.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,7 @@
22352235
"value": "none"
22362236
},
22372237
{
2238-
"label": "Restirct sharing to specific domains",
2238+
"label": "Restrict sharing to specific domains",
22392239
"value": "allowList"
22402240
},
22412241
{
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
function Add-CIPPAlias {
2+
[CmdletBinding()]
3+
param (
4+
$user,
5+
$Aliases,
6+
$UserprincipalName,
7+
$TenantFilter,
8+
$APIName = 'Set Manager',
9+
$ExecutingUser
10+
)
11+
12+
try {
13+
foreach ($Alias in $Aliases) {
14+
Write-Host "Adding alias $Alias to $user"
15+
New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$user" -tenantid $TenantFilter -type 'patch' -body "{`"mail`": `"$Alias`"}" -verbose
16+
}
17+
Write-Host "Resetting primary alias to $User"
18+
New-GraphPostRequest -uri "https://graph.microsoft.com/beta/users/$($user)" -tenantid $TenantFilter -type 'patch' -body "{`"mail`": `"$User`"}" -verbose
19+
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -tenant $($TenantFilter) -message "Added alias $($Alias) to $($UserprincipalName)" -Sev 'Info'
20+
return ("Added Aliases: $($Aliases -join ',')")
21+
} catch {
22+
Write-LogMessage -user $request.headers.'x-ms-client-principal' -API $APINAME -tenant $($TenantFilter) -message "Failed to set alias. Error:$($_.Exception.Message)" -Sev 'Error'
23+
throw "Failed to set alias: $($_.Exception.Message)"
24+
}
25+
}
26+

Modules/CIPPCore/Public/Add-CIPPApplicationPermission.ps1

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,26 @@ function Add-CIPPApplicationPermission {
1111
}
1212
Set-Location (Get-Item $PSScriptRoot).FullName
1313
if ($RequiredResourceAccess -eq 'CIPPDefaults') {
14-
$RequiredResourceAccess = (Get-Content '.\SAMManifest.json' | ConvertFrom-Json).requiredResourceAccess
14+
#$RequiredResourceAccess = (Get-Content '.\SAMManifest.json' | ConvertFrom-Json).requiredResourceAccess
15+
16+
$Permissions = Get-CippSamPermissions -NoDiff
17+
$RequiredResourceAccess = [System.Collections.Generic.List[object]]::new()
18+
19+
foreach ($AppId in $Permissions.Permissions.PSObject.Properties.Name) {
20+
$AppPermissions = @($Permissions.Permissions.$AppId.applicationPermissions)
21+
$Resource = @{
22+
resourceAppId = $AppId
23+
resourceAccess = [System.Collections.Generic.List[object]]::new()
24+
}
25+
foreach ($Permission in $AppPermissions) {
26+
$Resource.ResourceAccess.Add(@{
27+
id = $Permission.id
28+
type = 'Role'
29+
})
30+
}
31+
32+
$RequiredResourceAccess.Add($Resource)
33+
}
1534
}
1635
$ServicePrincipalList = New-GraphGETRequest -uri "https://graph.microsoft.com/beta/servicePrincipals?`$select=AppId,id,displayName&`$top=999" -skipTokenCache $true -tenantid $Tenantfilter -NoAuthCheck $true
1736
$ourSVCPrincipal = $ServicePrincipalList | Where-Object -Property AppId -EQ $ApplicationId

Modules/CIPPCore/Public/Add-CIPPAzDataTableEntity.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function Add-CIPPAzDataTableEntity {
138138
throw "Error processing entity: $ErrorMessage Linenumber: $($_.InvocationInfo.ScriptLineNumber)"
139139
}
140140
} else {
141-
Write-Information "THE ERROR IS $($_.Exception.ErrorCode). The size of the entity is $entitySize."
141+
Write-Information "THE ERROR IS $($_.Exception.message). The size of the entity is $entitySize."
142142
throw $_
143143
}
144144
}

0 commit comments

Comments
 (0)