Home

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

%3CLINGO-SUB%20id%3D%22lingo-sub-728225%22%20slang%3D%22en-US%22%3EHow%20to%20deny%20user%20connect%20powershell%20office365%20and%20trust%20ip%20connect%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-728225%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20as%20Current%20then%20all%20user%20can%20connect%20powershell%20office%20365%20and%20can%20get%20list%20all%20user%20in%20office365%20.How%20to%20deny%20or%20allow%20only%20some%20user%20can%20connect%20powershell%20office365%20%3F%20and%20can%20trust%20white%20list%20IP%20can%20connect%20powershell%20%3F%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-728225%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-728735%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20deny%20user%20connect%20powershell%20office365%20and%20trust%20ip%20connect%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-728735%22%20slang%3D%22en-US%22%3E%3CP%3EThere's%20no%20IP%20whitelist%20or%20anything%20similar%2C%20PowerShell%20access%20is%20controlled%20on%20per-user%20basis%20via%20Set-User.%20If%20you%20want%20something%20like%20a%20whitelist%2C%20you%20can%20try%20Conditional%20access%20policies%2C%20but%20you%20cannot%20scope%20those%20to%20just%20PowerShell.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-731192%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20deny%20user%20connect%20powershell%20office365%20and%20trust%20ip%20connect%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-731192%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%26nbsp%3B%3A%20we%20can%20disbale%20user%20connect%20by%20powershell%20%3F%26nbsp%3B%3CSPAN%3EConditional%20access%20policies%20seem%20need%20license%20AD%20premium%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-731883%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20deny%20user%20connect%20powershell%20office365%20and%20trust%20ip%20connect%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-731883%22%20slang%3D%22en-US%22%3E%3CP%3EYes%20you%20can%20disable%20it%20via%20the%20Set-User%20cmdlet%20as%20I%20mentioned%20above.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Tien Ngo Thanh
Regular Contributor

Hi 

    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,

Thanks

3 Replies
Highlighted

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.

Highlighted

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

Highlighted

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