Issue setting Azure Team Group SecurityEnabled from False to True

Brass Contributor

Hello.  Still new to this whole PowerShell thing.  I have Power Shell 7.1.4 PSEdition Core.

 

Since MSFT changed things from AzureRM/Azure to Az finding cmdlets not really matching instructions out there.

I'm good with log in Azure:  Connect-AzAccount

I'm good with vie Azure Groups:  Get-AzAdGroup -objectId <ID>
What is not working is the Set-AzAdGroup -objectId <ID> -SecurityEnabled $True

or Set-AzureADGroup -ObjectId <ID> -SecurityEnabled $True

What exactly is the new Az cmdlet to allow one to change the SecurityEnabled from False to True?

Thank you

2 Replies

@Vasil Michev hello.  I'm hoping since I see your a mega poster that you might have some insight for me on this.  I just need to get my O365 Team in Teams to have its SecurityEnabled switched from False to True so I can pick my Team as a co-owner in Power Apps.  Appreciate your time. 

If PowerShell is giving you trouble, you can always use the Graph API call directly: https://docs.microsoft.com/en-us/graph/api/group-update?view=graph-rest-beta&tabs=http
Or use the MSGraph module, which is wrapper for the above.
https://docs.microsoft.com/en-us/graph/powershell/installation