Forum Discussion
Can I Connect to O365 Security & Compliance center via powershell with MFA on?
- May 10, 2017
Nope, not yet. It's the last of the "modules" I use to get MFA support :(
Does it work for you though? The cmdlet has been available for at least a month now, but every time I try to connect I get Access denied errors.
MFA seems to be working for other items, but when I try Security and Compliance, I'm getting a 500 error back from the server. See below.
PS C:\Users\Jeff> Connect-IPPSSession
WARNING: Your connection has been redirected to the following URI:
"https://nam02b.ps.compliance.protection.outlook.com/PowerShell-LiveId?BasicAuthToOAuthConversion=true;PSVersion=5.1.14409.1005 "
New-ExoPSSession : Connecting to remote server nam02b.ps.compliance.protection.outlook.com failed with the following error message : <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>
For more information, see the about_Remote_Troubleshooting Help topic.
At C:\Users\Jeff\AppData\Local\Apps\2.0\ER689GCY.C50\E15M7H1X.VJ5\micr..tion_d8f8f667ee342b5c_0010.0000_46e6ccd01daac800\CreateExoPSSession.ps1:183 char:22
+ ... PSSession = New-ExoPSSession -UserPrincipalName $UserPrincipalName -C ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [New-ExoPSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : System.Management.Automation.Remoting.PSRemotingDataStructureException,Microsoft.Exchange.Management.ExoPowershellSnapin.NewExoP
SSession
- Rahul SrivastavaNov 06, 2017Copper Contributor
Even I am getting this error, it worked fine last week and now it doesn't, almost like 2 days.
Connecting to remote server aus01b.ps.compliance.protection.outlook.com failed with the following error message : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>Any idea?
- Andrew HammondNov 07, 2017Copper ContributorI'm also running into the same issue was fine few days ago now the same error. did you manage to fix this?
- Rahul SrivastavNov 07, 2017Copper Contributor
Andrew Hammond No, I am still struggling, I have raised the issue with MS, will keep you posted if I find any solution.
- VasilMichevOct 24, 2017MVP
Yup, I get the same today. Let me ping some folks...
- ScrJeffOct 24, 2017Brass Contributor
Thanks.
- VasilMichevOct 25, 2017MVP
Well it took some time, but it seems to be working fine now.