How to lock the screen after user inactivity.
From Intune go to Device -> macOS -> Configuration -> Create a profile -> Settings catalog
Click on + Add settings, In the search box type screensaver, you will see 2 settings, we need them
System Configuratin > Screensaver
Choose: Ask For Password | Ask For Password Delay | Login Window Idle Time | Module Name
User Experience > Screensaver User
Choose: Idle Time (It’s in seconds) | Module Name
Click Next and Assignments the profile to group.
MAC Side: