How to deny user connect powershell office365 and trust ip connect ?

Regular Contributor


    as Current then all user can connect powershell office 365 and can get list all user in office365 .How to deny or allow only some user can connect powershell office365 ? and can trust white list IP can connect powershell ?

Best Regards,


3 Replies

There's no IP whitelist or anything similar, PowerShell access is controlled on per-user basis via Set-User. If you want something like a whitelist, you can try Conditional access policies, but you cannot scope those to just PowerShell.

@Vasil Michev : we can disbale user connect by powershell ? Conditional access policies seem need license AD premium 

Yes you can disable it via the Set-User cmdlet as I mentioned above.