The Interactive Advanced Entra ID User Management Script provides a comprehensive and user-friendly solution for managing users, licenses, groups, roles, and MFA settings in Entra ID (formerly Azure Active Directory). This PowerShell-based tool simplifies administrative tasks through an intuitive interactive menu system.
-
User Management
- List all users with detailed properties
- Add new users with customizable settings
- Update existing user properties
- Search users by name, email, or department
-
License Management
- View available licenses and their counts
- Assign licenses to individual or multiple users
- Remove licenses with confirmation
- View current license assignments
-
Role Management
- Assign directory roles during user creation
- View available roles and their IDs
- Manage role assignments
-
MFA Management
- View current authentication methods
- Add/Remove authentication methods
- Manage FIDO2 security keys
- Configure Windows Hello for Business
Install-Module -Name Microsoft.Graph.Authentication
Install-Module -Name Microsoft.Graph.Users
Install-Module -Name Microsoft.Graph.Identity.DirectoryManagement
Install-Module -Name Microsoft.Graph.Users.Actions
Install-Module -Name Microsoft.Graph.Identity.SignIns
The account running the script needs these Microsoft Graph permissions:
User.ReadWrite.All
Group.ReadWrite.All
Directory.AccessAsUser.All
UserAuthenticationMethod.ReadWrite.All
- Clone or download this repository
- Ensure you have PowerShell 5.1 or later
- Install required modules as mentioned above
- Run the script from PowerShell ISE or PowerShell console
.\Interactive-EntraIDUserManagement.ps1
-
List all users
- View comprehensive list of all users
- Displays key properties like name, email, and status
-
Add a new user
- Enter user details (name, email, etc.)
- Set temporary password
- Assign licenses (optional)
- Assign roles (optional)
-
Update a user
- Modify display name
- Update job title
- Change department
- Enable/disable account
-
License Management
- View available licenses
- Assign licenses to users
- Remove licenses
- Bulk license operations
-
MFA Management
- View authentication methods
- Add/remove methods
- Configure security settings
1. Select "Add a new user" from main menu
2. Enter required information:
- Display Name
- User Principal Name (email)
- Mail Nickname
- Temporary Password
3. Choose license (optional)
4. Assign directory role (optional)
1. Select "License Management"
2. Choose user(s)
3. Select from options:
- Add License
- Remove License
- View Current Licenses
- The script includes comprehensive error handling
- All operations are logged
- User-friendly error messages
- Automatic retry for certain operations
- Password complexity requirements
- Forced password change at first login
- MFA configuration options
- Secure credential handling
- Name: Mezba Uddin
- Version: 2.2
- Last Updated: 2024-11-06
For issues, questions, or contributions:
- Open an issue in the GitHub repository
- Provide detailed information about the problem
- Include error messages and script version
This project is licensed under the MIT License - see the LICENSE file for details.
- Microsoft Graph PowerShell SDK team
- PowerShell community
- All contributors and testers