Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to Security & Compliance Center using Service Principle & Thumbprint #4643

Open
RohitRaj-18 opened this issue May 7, 2024 · 1 comment

Comments

@RohitRaj-18
Copy link

Description of the issue

I am unable to connect to Security & Compliance component using Service Principle. While connecting the below error is coming up:

An error occurred while sending the request.
At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\3.4.0\netFramework\ExchangeOnlineManagement.psm1:762 char:21

  •                 throw $_.Exception.InnerException;
    
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (:) [], HttpRequestException
    • FullyQualifiedErrorId : An error occurred while sending the request.

Permission assigned :
Global Reader & Security Reader Role has been assigned to Azure AD APP.

Microsoft 365 DSC Version

1.24.424.1 1.24.424.1

Which workloads are affected

Security & Compliance Center

The DSC configuration

No response

Verbose logs showing the problem

No response

Environment Information + PowerShell Version

No response

@RohitRaj-18
Copy link
Author

We have a proxy configured and now we are getting the HTTPException Error

Connect-IPPSSession -CertificateThumbPrint $CertificateThumprint -AppID $AppID -Organization $TenantID -verbose
VERBOSE: Returning precomputed version info: 3.4.0
VERBOSE: ModuleVersion: 3.4.0
VERBOSE: ConnectionContext Removed
OperationStopped: The proxy tunnel request to proxy 'http://10.251.32.76:8080/' failed with status code '403'."
PS C:\Windows\System32> Get-Error

Exception :
Type : System.Net.Http.HttpRequestException
HttpRequestError : ProxyTunnelError
TargetSite :
Name : MoveNext
DeclaringType : [System.Net.Http.HttpConnectionPool+d__110]
MemberType : Method
Module : System.Net.Http.dll
Message : The proxy tunnel request to proxy 'http://10.251.32.76:8080/' failed with status code '403'."
Source : System.Net.Http
HResult : -2146233088
StackTrace :
at System.Net.Http.HttpConnectionPool.EstablishProxyTunnelAsync(Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken
originalCancellationToken)
CategoryInfo : OperationStopped: (:) [], HttpRequestException
FullyQualifiedErrorId : The proxy tunnel request to proxy 'http://10.251.32.76:8080/' failed with status code '403'."
InvocationInfo :
ScriptLineNumber : 762
OffsetInLine : 21
HistoryId : 22
ScriptName : C:\Users\A911276-adm\Documents\PowerShell\Modules\ExchangeOnlineManagement\3.4.0\netCore\ExchangeOnlineManagement.psm1
Line : throw $_.Exception.InnerException;

Statement        : throw $_.Exception.InnerException
PositionMessage  : At C:\Users\A911276-adm\Documents\PowerShell\Modules\ExchangeOnlineManagement\3.4.0\netCore\ExchangeOnlineManagement.psm1:762 char:21
                   +                     throw $_.Exception.InnerException;
                   +                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PSScriptRoot     : C:\Users\A911276-adm\Documents\PowerShell\Modules\ExchangeOnlineManagement\3.4.0\netCore
PSCommandPath    : C:\Users\A911276-adm\Documents\PowerShell\Modules\ExchangeOnlineManagement\3.4.0\netCore\ExchangeOnlineManagement.psm1
CommandOrigin    : Internal

ScriptStackTrace : at Connect-ExchangeOnline, C:\Users\A911276-adm\Documents\PowerShell\Modules\ExchangeOnlineManagement\3.4.0\netCore\ExchangeOnlineManagement.psm1: line 762
at Connect-IPPSSession, C:\Users\A911276-adm\Documents\PowerShell\Modules\ExchangeOnlineManagement\3.4.0\netCore\ExchangeOnlineManagement.psm1: line 904
at , : line 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant