How Can We Limit User Access to MGGraph for Better Security?

0
1
Asked By SecureGopher89 On

Hey folks! I'm currently testing the security of our M365 tenant and I've run into a situation where standard users can execute commands like "Get-MgUser -All -Property DisplayName,UserPrincipalName,JobTitle,EmployeeId" to export user data into a CSV. While I understand that this access doesn't seem like an immediate threat, I worry that if an account gets compromised, an attacker could quickly export our entire user directory. It feels like there's way too much exposure for gathering information. I notice that disabling this access messes up the Teams search and SharePoint people picker for everyone, and I can't find a way to limit it effectively. Has anyone found any smart solutions or workarounds to mitigate this issue? Especially for temporary staff accounts?

5 Answers

Answered By TechGuard21 On

You're right about standard users being able to look up all users in the directory; that's how it's designed to function. It’s more about the services needing that access rather than a flaw in the system. Instead of trying to block access, focus on reducing the risk of accounts getting compromised in the first place.

Answered By AdminAlert99 On

You can't totally avoid get-mguser commands, but you can tweak some permissions. In the Microsoft Entra admin center, change the setting so only admins can give Graph permissions. This helps a bit to restrict unwanted access.

Answered By GuardDog567 On

Even if you try to block access via PowerShell, realize that users can still grab this info in other ways, like through Outlook's cached global address list. The best bet is to focus on solid security practices like least privilege access and MFA instead of just hiding user data.

Answered By PowerSecure33 On

To limit access without breaking everything, you might consider disabling non-admin access to the Azure Portal and managing group access more strictly. There's also conditional access for mgGraph PowerShell which could help.

Answered By DataDefenderX On

Unfortunately, you can’t completely restrict access to user data as it’s necessary for many services. Instead, consider using security tools that monitor unusual activity. If a user is suddenly querying a lot of data, it can trigger alerts for quick action.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.