Forum Discussion

Stefanie Cortese's avatar
Stefanie Cortese
Copper Contributor
Jul 12, 2018

Policy in office 365 to block users after a period of inactivity

I want to apply a policy that automatically blocks a user from sign in after a period of time.

 

I know I can see inactive user reports

I know how to manually block users

I know I can run a power shell script to find inactive users and block them

 

I am looking for a way to automatically block these users with out IT having to do something. 

7 Replies

  • Stefanie Cortese 

     

    May consider Azure Access Reviews which allows you to periodically review and manage access to resources (like user accounts) based on predefined schedules

  • iyad's avatar
    iyad
    Copper Contributor

    Stefanie Cortese 

     

    Look into the below link, that might be helpful 

     

    https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/howto-manage-inactive-user-accounts 

    • Max Fritz's avatar
      Max Fritz
      Iron Contributor
      That only expires the session though, not block/disable the user. I believe Stefanie was asking about blocking accounts. Could do configurable tokens in AAD (soon to be part of/replaced by Conditional Access) if we're just talking about session timeouts.
  • Max Fritz's avatar
    Max Fritz
    Iron Contributor

    There is no policy built in to Office 365 that matches what you're describing (automatically block users from signing in after a specific period of inactivity). You could however create an https://azure.microsoft.com/en-us/services/functions/ or a scheduled task on a server to run a PowerShell script to find inactive users and block them on a regular basis. That would be my best approach to this.

     

    I'd be curious to hear more about the use case for this though. Is this a security measure?

    • Stefanie Cortese's avatar
      Stefanie Cortese
      Copper Contributor

      Thanks. It is for compliance. I don't let any users sit out there that long that are inactive or should be disabled. This requirement is to "check the box" that compliance is met. 

      • CyberChris's avatar
        CyberChris
        Copper Contributor

        Stefanie Cortese 

         

        Hello from 2024! Any chance this feature has been developed? I too am trying to check a compliance box. Thanks!

Resources