Skip to content

Connect-OrganizationAddInService SessionTimeOutException, can't reconnect #6599

@DKMiller71

Description

@DKMiller71

Provide required information needed to triage your issue

When connected to the OrganizationAddInService, after a while, it will timeout and not allow reconnect. Trying to Connect-OrganizationAddInService tells you you need to Connect-OrganizationAddInService first.

Your Environment

Windows 11 Enterprise
Powershell 5.1.26100.7705
O365CentralizedAddInDeployment 3.0.2

Expected behavior

When the session times out, it should reacquire the connection assuming login details are still valid. At the very least, running Connect-OrganizationAddInService again should let you initialize the session.

Current behavior

Example command:

PS > Get-OrganizationAddIn -ProductId $na.ProductId -GetAllDetails

Get-OrganizationAddIn : The Organization Add-In Service session was not initialized. Please call the
Connect-OrganizationAddInService commandlet first.
At line:1 char:7
+ $na = Get-OrganizationAddIn -ProductId $na.ProductId -GetAllDetails
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-OrganizationAddIn], SessionTimeOutException
    + FullyQualifiedErrorId : Microsoft.OrganizationAddInPowerShell.Exceptions.SessionTimeOutException,Microsoft.OrganizationAddInPowerShell.Cmdlets.GetOrganizationAddIn

Trying to reestablish session:

PS > Connect-OrganizationAddInService

Connect-OrganizationAddInService : The Organization Add-In Service session was not initialized. Please call the Connect-OrganizationAddInService commandlet first.
At line:1 char:1
+ Connect-OrganizationAddInService
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Connect-OrganizationAddInService], SessionTimeOutException
    + FullyQualifiedErrorId : Microsoft.OrganizationAddInPowerShell.Exceptions.SessionTimeOutException,Microsoft.OrganizationAddInPowerShell.Cmdlets.ConnectOrganizationAddInService

Steps to reproduce

  1. Connect to the service with Connect-OrganizationAddInService
  2. Use commands for a while or let session be idle for a while
  3. Try to resume using session - fails with ServiceTimeoutException.
  4. Try to reconnect to service - fails with ServiceTimeoutException.

Context

Impacting ability to manage add ins,

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions