You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am exporting a snapshot of our M365 tenant and I have been able to export all configurations but the Teams export is failing with the error below. I have assigned all the requisite APIs and roles to the service principle but I still get the same error. I am also using TLS 1.2 so it is not appear to be a network issue. This appears to be a bug. I searched through the issues reported here and did not find any similar issue reported. .Net is 4.8 or later on my system.
{InvalidOperation}
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpClientHelper.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpRequestHelper1.<GetAllAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.BaseTpmGetCmdlet1.<>c__DisplayClass8_0.<b__0>d.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.BaseTpmGetCmdlet1.ProcessRecord()
---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpClientHelper.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpRequestHelper1.<GetAllAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.BaseTpmGetCmdlet1.<>c__DisplayClass8_0.<b__0>d.MoveNext()<---
"Error during Export:"
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1\DSCResources\MSFT_TeamsAppSetupPolicy\MSFT_TeamsAppSetupPolicy.psm1: line 448
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1\Modules\M365DSCReverse.psm1: line 682
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1\Modules\M365DSCUtil.psm1: line 1458
at , : line 1
Error Log created at {file-M365DSC-ErrorLog.log}
[2/51] Extracting [TeamsAppSetupPolicy] using {CertificateThumbprint}...VERBOSE: Attempting connection to {MicrosoftTeams} with:
VERBOSE:
Name Value
---------
CertificateThumbprint 00000000000000000000000000000000000000000
TenantId xxxxxxxxxxxxxx.onmicrosoft.com
ApplicationId 00000000-0000-0000-0000-00000000000
VERBOSE: ApplicationId, TenantId, CertificateThumbprint were specified. Connecting via Service Principal
VERBOSE: Calling into Connect-M365Tenant
VERBOSE: Connection initiated.
VERBOSE: Dependencies were already successfully validated.
❌
Error Log created at {file://C:/Users/.../-M365DSC-ErrorLog.log}
Environment Information + PowerShell Version
OsName : Microsoft Windows 11 Enterprise N
OsOperatingSystemSKU : WindowsEnterprise
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-US
OsMuiLanguages : {en-US}
Name Value
---------
PSVersion 5.1.22621.4111
PSEdition Desktop
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
BuildVersion 10.0.22621.4111
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered:
Description of the issue
I am exporting a snapshot of our M365 tenant and I have been able to export all configurations but the Teams export is failing with the error below. I have assigned all the requisite APIs and roles to the service principle but I still get the same error. I am also using TLS 1.2 so it is not appear to be a network issue. This appears to be a bug. I searched through the issues reported here and did not find any similar issue reported. .Net is 4.8 or later on my system.
{InvalidOperation}
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpClientHelper.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpRequestHelper
1.<GetAllAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.BaseTpmGetCmdlet
1.<>c__DisplayClass8_0.<b__0>d.MoveNext()--- End of inner exception stack trace ---
at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.BaseTpmGetCmdlet
1.ProcessRecord()---> (Inner Exception #0) System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpClientHelper.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.HttpRequestHelper
1.<GetAllAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Teams.Policy.Administration.Cmdlets.Providers.BaseTpmGetCmdlet
1.<>c__DisplayClass8_0.<b__0>d.MoveNext()<---"Error during Export:"
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1\DSCResources\MSFT_TeamsAppSetupPolicy\MSFT_TeamsAppSetupPolicy.psm1: line 448
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1\Modules\M365DSCReverse.psm1: line 682
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.1211.1\Modules\M365DSCUtil.psm1: line 1458
at , : line 1
Microsoft 365 DSC Version
1.24.1211.1
Which workloads are affected
Teams
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
The text was updated successfully, but these errors were encountered: