A pretty simple and straight forward Powershell Module for Microsoft Graph primarily created for managing groups and templates.
Either copy the Release/MyAAD to a directory of your choice or see install.
First of you need to register an application in Azure AD and create secrets for it: instructions.
# Enter Application ID as username and secret as password
$Credential = Get-Credential
# Get Access token
$AccessTokenResponse = Get-MyAADAccessToken -ClientCredential $Credential -TenantName contoso.onmicrosoft.com
$AccessToken = $AccessTokenResponse.access_token
# Fetch all unified groups
Get-MyAADUnifiedGroups -AccessToken $AccessToken
Gets a graph access token
PS C:\> Get-MyAADAccessToken -ClientCredential $Credential -TenantName contoso.onmicrosoft.com
Fetches all settings from templates etc from you AAD
PS C:\> Get-MyAADDirectorySettings -AccessToken $AccessToken
Fetches all AAD directory settings templates
PS C:\> Get-MyAADDirectorySettingTemplates -AccessToken $AccessToken
Fetches all settings applied for a specific group
PS C:\> Get-MyAADGroupSetting
Fetches all security alerts with the graph API
PS C:\> Get-MyAADSecurityAlerts
Fetches all unified groups from your AAD tenant
PS C:\> Get-MyAADUnifiedGroups -AccessToken $AccessToken
Creates a new Directory Settings object
PS C:\> $UnifiedGroupTemplate = Get-MyAADDirectorySettingTemplates -AccessToken $AccessToken | ? {$_.DisplayName -eq 'Group.Unified'}
Sets new group setting on group from a template.
PS C:\> $Settings = [PSCustomObject]@{
Removes specific settings object froup group
PS C:\> Remove-MyAADGroupSetting -Id $GroupId -SettingsId $SettingsIDGuid
PS C:\> $GroupSettings = Get-MyAADGroupSetting -AccessToken $AccessToken -Id $GroupId
Enables or disables guest access on specific group
PS C:\> Set-MyAADGroupGuestAccess -AllowAddGuests $False -AccessToken $AccessToken
PS C:\> Set-MyAADGroupGuestAccess -AllowAddGuests $True -AccessToken $AccessToken
PS C:\> $Groups | Set-MyAADGroupGuestAccess -AllowAddGuests $False -AccessToken $AccessToken
Updates a security alert
PS C:\> Update-MyAADSecurityAlert -AccessToken $AccessToken -Id $AlertId -AssignedTo Someone
PS C:\> $FilteredAlerts | Update-MyAADSecurityAlert -AccessToken $AccessToken -Id $AlertId -AssignedTo Someone