Nov 15 2016 03:45 AM
Nov 15 2016 03:45 AM
I need to change all Public Groups to Provate Groups. So I am attempting to run:
Get-UnifiedGroup | Where {$_.AccessType -eq "Public"} | Set-UnifiedGroup -AccessType Private
I keep getting this error:
A parameter cannot be found that matches parameter name 'AccessType'.
Anyone experienced this?
Nov 15 2016 05:37 AM
Mmm...very weird, I have just pasted your PS code in the PowerShell console and I have not had any error...however I'm seeing a warning seeing that the comand execution finished correctly, but not configuration has been modified for every group on the tenant. If I run the Set-UnifiedGroup "Group Name" -AccessType "Public" it works without problems....and also to add, it's not enougt (I believe) to be Global Administrator to change this setting for each Group. You need to be an Owner in each Group...adding some more folks here @TonyRedmond @cfiessinger @VasilMichev
Nov 15 2016 05:48 AM
Nov 15 2016 08:22 AM
I just tried it here and was able to run Set-UnifiedGroup to set the access type for a group from public to private and vice versa.
Nov 15 2016 08:29 AM
Nov 15 2016 08:32 AM
A group owner can change group properties.
A global tenant administrator can change the properties of any group.
The change should happen immediately. Whether the UI of a client picks the change up and displays that change is entirely a different matter - clients do cache properties and it all depends on how often they check with AAD to ensure what the values of the properties actually are...
Nov 15 2016 08:36 AM
Nov 15 2016 08:45 AM
Yeah, could be that. OWA refresh of group properties is the likely issue here.
Nov 15 2016 11:15 AM
When using PowerShell with ISE I don't even get access to tthe -AccessType Paramater to use? I have tested in a demo tenant and seem to have access. But when trying this through a prod tenant even though the account is a global admin -AccessType is not available.
There is another issue in play here in that the organisations email is on premise and NOT in Exchange Online adn there is NO Hybrid set up either. All these groups have created as a result of users accessing Planner and creating Plans.
Nov 15 2016 11:22 AM
I don't know how you have connected to Exchange Online using PowerShell ISE. It's odd that the -AccessType parameter is unavailable. Is it the same with the normal PowerShell console?
Even though users might use another email system (non-hybrid, outside Office 365) for their day-to-day email, do they have Exchange Online mailboxes? If they are assigned something like an E3 license, they will get an Exchange mailbox automatically... So the mailboxes might be there and are linked to Office 365 accounts but are not being used.
Nov 15 2016 11:30 AM
So I am running this in a demo tenant and it works
$userCredential = Get-Credential
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $session
Set-UnifiedGroup -Identity "Name here" -AccessType Private
When running the same commands in a prod tenant there is no ability to use the -AccessType Parameter....
Nov 15 2016 11:52 AM
So I have tried in a number of different tentants all with Global Administrator Accounts.
In some tenants I get this (-AccessType Parameter is available):
In other tenants I get this (No -AccessType Paramater available)
Of course the tenant I need to change AccessType on is one of the ones that does not have access to this parameter for some reason....Frustrating. Any insights, thoughts, ideas etc would be greatly appreciated.
Nov 15 2016 01:05 PM
I don't think this is a First Release thing because the AccessType parameter has been around for quite a while. I do think this is something you need to report to Microsoft in a support call as only they can resolve the issue.
Nov 15 2016 02:49 PM
On a similar topic I wrote this recently:
#................................... # Variables: # Cut off date in days # Classification #................................... $cutoffdate = ((Get-Date).AddDays(-10)) $classification = "High" # Retrieve recently created groups with accesstype set to PUBLIC $Groups = Get-UnifiedGroup | Where-Object { $_.WhenCreated -ge $cutoffdate -and $_.AccessType -eq 'Public' -and $_.Classification -eq $classification } ` | Sort-Object whencreated | Select DisplayName, WhenCreated, AccessType, Classification, ManagedBy # For each new group update set accesstype to PRIVATE ForEach ($G in $Groups) { Set-UnifiedGroup -Identity $G.DisplayName -AccessType 'Private' Write-Host "The following Group privacy setting was updated:" $G.DisplayName }
Nov 15 2016 02:51 PM
Hi @cfiessinger my issue is that in some tenants I do not have access to this parameter -AccessType for some reason? Any clues?
Nov 15 2016 02:53 PM
Aug 19 2019 02:13 PM
is there anyway to keep the Public Group but prevent users from using the email feature and be able to become members by themselves going to the the members section and click on join ?