Create a group and add members
In this task you'll create a security group and add members.
Groups let you give access once to many people. Give a role to the group, and everyone in it gets that role. When someone joins or leaves the team, you only change the group.
Security groups are for access. Microsoft 365 groups are for working together and come with a shared mailbox, calendar and files. Membership can be assigned (you add people) or dynamic (a rule adds them, which needs Entra ID P1).
Example. Larkfield Group creates a security group called Web Team, gives it Contributor on rg-web-test, and adds each new developer to the group instead of giving roles one person at a time.
Before you start
You need: Groups Administrator or User Administrator. Time: 5 minutes.
Where to look
- Home
- Microsoft Entra ID
- Groups
- New group
Steps
- Open Microsoft Entra ID, select Groups, then New group.
- Set Group type to Security.
- Name it grp-portal-practice and add a short description.
- Leave Membership type as Assigned.The list also offers Dynamic User and Dynamic Device, but they need Entra ID P1 licences.
- Under Members, select the link that says no members are selected, pick Test User, then choose Select.
- Under Owners, add yourself.Owners can manage who's in the group without needing an admin role.
- Select Create. A message says Group created. Open the group: its Overview shows Total direct members.You can now give this group a role, as in section 3.
Commands
# Create the group
az ad group create --display-name grp-portal-practice --mail-nickname grp-portal-practice
# Add the test user to it
az ad group member add --group grp-portal-practice \
--member-id $(az ad user show --id test.user@<your-domain> --query id --output tsv)
# Delete the group again
az ad group delete --group grp-portal-practice
Watch out for
- Cost
- Groups are free. Dynamic membership and group-based licensing need Entra ID P1.
- Security
- A group's owners can add anyone to it, and that person then gets every role the group has. Choose owners carefully.
- Common mistakes
- Choosing Microsoft 365 when you only need access control, which also creates a mailbox and more. You can't simply switch a group between the two types later.
Clean up
- Groups
- grp-portal-practice
- Delete
Open the group, select Delete and choose OK. Security groups are deleted for good straight away; Microsoft 365 groups can be restored for 30 days.
Words to know
- Security group
- A group used to give access to resources and apps.
- Microsoft 365 group
- A group for teamwork, with a shared mailbox, calendar and files.
- Dynamic membership
- Members are added and removed by a rule, such as department equals Sales. Needs Entra ID P1.
Tick off each step and track your progress in the guide.
Open this task in Azure Portal, Hands On