Skip to content

Commit 52aa7b1

Browse files
authored
Merge pull request #283 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents af25c2f + 57868b6 commit 52aa7b1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Setup/Invoke-ExecCreateSAMApp.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using namespace System.Net
22

3-
Function Invoke-ExecCreateSAMApp {
3+
function Invoke-ExecCreateSAMApp {
44
<#
55
.FUNCTIONALITY
66
Entrypoint,AnyTenant
@@ -19,7 +19,7 @@ Function Invoke-ExecCreateSAMApp {
1919
$URL = ($Request.headers.'x-ms-original-url').split('/api') | Select-Object -First 1
2020
$TenantId = (Invoke-RestMethod 'https://graph.microsoft.com/v1.0/organization' -Headers @{ authorization = "Bearer $($Token.access_token)" } -Method GET -ContentType 'application/json').value.id
2121
#Find Existing app registration
22-
$AppId = (Invoke-RestMethod 'https://graph.microsoft.com/v1.0/applications' -Headers @{ authorization = "Bearer $($Token.access_token)" } -Method GET -ContentType 'application/json' -Body "{ `"filter`": `"displayName eq 'CIPP-SAM'`" }").value | Select-Object -Last 1
22+
$AppId = (Invoke-RestMethod "https://graph.microsoft.com/v1.0/applications?`$filter=displayName eq 'CIPP-SAM'" -Headers @{ authorization = "Bearer $($Token.access_token)" } -Method GET -ContentType 'application/json').value | Select-Object -Last 1
2323
#Check if the appId has the redirect URI, if not, add it.
2424
if ($AppId) {
2525
Write-Host "Found existing app: $($AppId.id). Reusing."

Modules/CIPPCore/Public/Set-CIPPCopyGroupMembers.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function Set-CIPPCopyGroupMembers {
4646
try {
4747
if ($PSCmdlet.ShouldProcess($MailGroup.displayName, "Add $UserId to group")) {
4848
if ($MailGroup.MailEnabled -and $Mailgroup.ResourceProvisioningOptions -notcontains 'Team' -and $MailGroup.groupTypes -notcontains 'Unified') {
49-
$Params = @{ Identity = $MailGroup.mailNickname; Member = $UserId; BypassSecurityGroupManagerCheck = $true }
49+
$Params = @{ Identity = $MailGroup.id; Member = $UserId; BypassSecurityGroupManagerCheck = $true }
5050
try {
5151
$null = New-ExoRequest -tenantid $TenantFilter -cmdlet 'Add-DistributionGroupMember' -cmdParams $params -UseSystemMailbox $true
5252
} catch {

0 commit comments

Comments
 (0)