Restrict Users From Creating New Teams in Microsoft Teams

If you have recently adopted the usage for Microsoft Teams, managing Teams within Teams becomes a toungue twister in itself, If you’re concerned about users creating teams or groups that don’t comply with your business standards, perhaps you want this to be delegated to set of mindful power users group.

  1. Create a Group – This could be a Active Directory Synced group or M365 group
  2. Install AzureAD Public Preview – AzureAD PowerShell Module.
  3. Run the below script, replace the value of “<GroupName>” with the name of the group you have created, enter the administrator credentials when prompted
$GroupName = "<GroupName>"
$AllowGroupCreation = $False

Connect-AzureAD

$settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
if(!$settingsObjectID)
{
    $template = Get-AzureADDirectorySettingTemplate | Where-object {$_.displayname -eq "group.unified"}
    $settingsCopy = $template.CreateDirectorySetting()
    New-AzureADDirectorySetting -DirectorySetting $settingsCopy
    $settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
}

$settingsCopy = Get-AzureADDirectorySetting -Id $settingsObjectID
$settingsCopy["EnableGroupCreation"] = $AllowGroupCreation

if($GroupName)
{
  $settingsCopy["GroupCreationAllowedGroupId"] = (Get-AzureADGroup -SearchString $GroupName).objectid
} else {
$settingsCopy["GroupCreationAllowedGroupId"] = $GroupName
}
Set-AzureADDirectorySetting -Id $settingsObjectID -DirectorySetting $settingsCopy

(Get-AzureADDirectorySetting -Id $settingsObjectID).Values

reference: https://docs.microsoft.com/en-us/microsoft-365/solutions/manage-creation-of-groups?view=o365-worldwide

Microsoft Admin Portals

Microsoft 365 Admin Portals

Portal NameURL
Microsoft 365 Admin Portalhttps://admin.microsoft.com/ 
Microsoft 365 Compliancehttps://compliance.microsoft.com/
Microsoft Endpoint Manager Admin Consolehttps://endpoint.microsoft.com/
Microsoft Endpoint Manager Admin Console (old)https://devicemanagement.portal.azure.com/
Exchange Admin Center (new)https://admin.exchange.microsoft.com/
Exchange Admin Center (old)https://outlook.office365.com/ecp/
Microsoft Teams Admin Centerhttps://admin.teams.microsoft.com/ 
SharePoint Admin Centerhttps://admin.microsoft.com/sharepoint
OneDrive Admin Centerhttps://admin.onedrive.com/
Apps Admin Centerhttps://config.office.com/officeSettings#
Power BI Admin Portalhttps://app.powerbi.com/admin-portal/usageMetrics?noSignUpCheck=1
Power Platform admin centerhttps://admin.powerplatform.microsoft.com/
Microsoft Stream Admin Centerhttps://web.microsoftstream.com/admin
Skype for Business admin center (deprecated)https://webdir2a.online.lync.com/LSCP
Kaizala Management Portalhttps://manage.kaiza.la/
Yammer Adminhttps://www.yammer.com/office365/admin
Microsoft Store for Businesshttps://businessstore.microsoft.com/
Microsoft Store for Educationhttps://educationstore.microsoft.com/
Microsoft Partner Centerhttps://partner.microsoft.com/dashboard
Microsoft Remote Connectivity Analyzerhttps://testconnectivity.microsoft.com
Microsoft 365 network connectivity testhttps://connectivity.office.com/
Microsoft Call Quality Dashboardhttps://cqd.teams.microsoft.com/

Azure IT Admin Portals

Portal NameURL
Microsoft Azure Portalhttps://portal.azure.com/ 
Microsoft Azure (Release Candidate)https://rc.portal.azure.com/
Microsoft Azure (Preview)https://preview.portal.azure.com/
Azure Resource Explorerhttps://resources.azure.com/
Azure Cloud Shellhttps://shell.azure.com/
Azure Active Directory admin centerhttps://aad.portal.azure.com/
Azure Cosmos DBhttps://cosmos.azure.com/
Azure Data Factoryhttps://adf.azure.com/
Azure Cognitive Services Custom Translatorhttps://portal.customtranslator.azure.ai/
Azure Non-profit Portalhttps://nonprofit.microsoft.com/#/ngoportal
Portal NameURL
Azure Security Centerhttps://portal.azure.com…

Microsoft Licensing/Support Portals

Portal NameURL
Volume Licensing Service Centerhttps://www.microsoft.com/Licensing/servicecenter/
Next Generation Volume Licensinghttps://businessaccount.microsoft.com/
Microsoft Azure Enterprise Portalhttps://ea.azure.com/
Microsoft Services Hubhttps://serviceshub.microsoft.com/
Microsoft License Advisorhttps://mla.microsoft.com/
Microsoft Partner Centerhttps://partner.microsoft.com/
Azure Subscriptionshttps://account.azure.com/Subscriptions

Security / Defender IT Admin Portals

Portal NameURL
Microsoft Cloud App Securityhttps://portal.cloudappsecurity.com/
Microsoft Defender for Endpoints
(Previously Defender ATP)
https://securitycenter.windows.com/
Microsoft 365 Defenderhttps://security.microsoft.com/
Office 365 Security & Compliancehttps://protection.office.com/
Microsoft Defender for Identity
(Previously Azure ATP)
https://portal.atp.azure.com/
Multi-factor authenticationhttps://account.activedirectory.windowsazure.com…

Developer Portals

Portal NameURL
Graph Explorerhttps://developer.microsoft.com/en-us/graph/graph-explorer 
Azure DevOpshttps://dev.azure.com/
Visual Studio Subscriptionshttps://my.visualstudio.com/
Visual Studio Subscriptions Managementhttps://manage.visualstudio.com/
Adaptive Cardshttps://adaptivecards.io/

Other Useful Microsoft Portals

Portal NameURL
Office 365 Anti-Spam IP Delist Portalhttps://sender.office.com/
Azure Statushttps://status.azure.com/
Azure DevOps Statushttps://status.dev.azure.com/
Windows Virtual Desktop Consent Pagehttps://rdweb.wvd.microsoft.com/
Customer Digital Experienceshttp://demos.microsoft.com/
Group Policy Searchhttps://gpsearch.azurewebsites.net/
Microsoft Startupshttps://portal.startups.microsoft.com/
Office UI Fabric Iconshttps://uifabricicons.azurewebsites.net/ 
Become Microsoft Certifiedhttps://query.prod.cms.rt.microsoft.com… 
Tech Community Video Hubhttps://techcommunity.microsoft.com/t5/video-hub/ct-p/VideoHub 
Microsoft Azure Sponsorshipshttps://www.microsoftazuresponsorships.com/
Microsoft Dynamics Lifecycle Serviceshttps://lcs.dynamics.com/
Microsoft MVPhttps://mvp.microsoft.com/
Portal NameURL
What is my Microsoft Azure and Office 365 tenant ID?https://www.whatismytenantid.com/
Office 365 ATP Safe Links Decoderhttps://o365atp.com/
Message Header Analyzerhttps://mha.azurewebsites.net/
Tenant Availability Checkhttps://o365.rocks/

Reference: https://msportals.xyz/

Licenses could not be assigned or removed due to an error -Azure AD group based licenses

Scenario: Group based licensing is enabled in Azure AD. Exchange online is not assigned through the group based licensed. Newly added users to the group fail to get licenses assigned via the group. Reprocessing the group based license throws error:

Licenses could not be assigned or removed due to an error

Solution: A recent service plan backfilled by the O365 Commerce Team into the Office and Microsoft SKUs Microsoft Bookings a has been added as Enabled on all the licenses. This service plan has a dependency on Exchange Online (Plan 1) or Exchange Online (Plan2).

Disabling the Microsoft Bookings service plan in the affected groups should resolve the licensing error.

Kill all active user sessions in any Azure AD/ Office 365 application

If you are are ever in a situation where you have to deal with a compromised O365 account or situation similar to mine where users were assigned Onedrive/SPO license and you want to revoke them and stop users from using them immediately, the below cmdlet is much helpful.

If you are dealing with a large group of users, you may tire your fingers clicking on “initiate sign-out” or better get all members of the group and use cmdlet Revoke-AzureADUserAllRefreshToken which invalidates the refresh tokens issued to applications for a user. The cmdlet also invalidates tokens issued to session cookies in a browser for the user. The cmdlet operates by resetting the refreshTokensValidFromDateTime user property to the current date and time.

Get the group objectid

Get-MsolGroup [groupname] | fl ObjectId

Next, export the users of the group to a csv

Get-MsolGroupMember -GroupObjectId xxxxx-xxxxx-xxxxx-xxxxx | Select-Object EmailAddress | Export-Csv -Path c:\temp\users.csv

Import the csv and revoke th refresh token for these users.

Import-CSV “c:\temp\users.csv” | % {Get-AzureADUser -SearchString $_.emailaddress | Revoke-AzureADUserAllRefreshToken}

Force a sync from Azure AD Connect to Office 365

AAD sync runs every 30 minutes, we are several situations where you cant wait 30 minutes for a change to sync across, you still want to force a sync. To do so, on the server which has AAD Connect installed and type the following to import the AAD Connect PowerShell module:

Import-Module ADSync

You check the current settings of the sync scheduler

Get-ADSyncScheduler

adsync01

To force a delta sync, you the following PowerShell command:

Start-ADSyncSyncCycle -PolicyType Delta

adsync02

If you want to force an initial (full) sync, use this command:

Start-ADSyncSyncCycle -PolicyType Initial