My first couple questions is
- What version of Orchestrator are you using?
- What authentication methods do you have enabled? Including if you’d disabled Basic authentication for any tenant.
Maintenance Mode was introduced in 2019, and in 2020 Identity Service was added.
When I test on my 2021 sandbox with a number of authentication methods enabled, I can reach Identity Service to authenticate by directly visiting
<orchestratorhost>/identity as well as Swagger
<orchestratorhost>/swagger while in Maintenance Mode.
(Basic on Host & Default Tenant, Windows Auth, Azure AD, and SAML on the Host, along with Azure AD on Default Tenant).
When I authenticate with Identity, it doesn’t seem to carry over other than the Windows Authentication, but unfortunately if I recall correctly Windows Auth can only authenticate to the Default Tenant, so it wouldn’t work in this case as you need to be authenticated to host.
In my case I happen to have 3 users configured for the HOST the original
admin account and a couple accounts associated with domain users and I can use these to to authenticate against the
/api/Account/Authenticate end point. Unfortunately here Swagger interface doesn’t expose a way to inject the Bearer Token and when hitting one of the
/api/Maintenance/* endpoints the authentication challenge is received, but it doesn’t like any of the credential combinations I’ve tried.
So using Postman or another form of calling the API that allows you to manipulate the Requests will need to be used, just make sure that you are passing
host as your Tenant when authenticating.
Some alternative methods if it suites you would be
PowerShell and UiPath.PowerShell Module and very basic usage would be below
If you’ve never used the Module before, you’ll likely need to Install NuGet PackageProvider along with Registering the Repository, more information can be found in the Readme of the Github Repository I linked to above.
Install-PackageProvider -Name NuGet -Force -Scope CurrentUser
Register-PSRepository -Name UiPath -SourceLocation https://www.myget.org/F/uipath-dev/api/v2
Import-Module UiPath.PowerShell -MaximumVersion 184.108.40.206
Get-UiPathAuthToken -URL https://orchestrator/ -TenantName host -Username admin -Session
Start-UiPathMaintenance -Phase Draining
Start-UiPathMaintenance -Phase Suspended
In the above I’m specifying the max version of the module to use as there is an issue with higher versions when still using Orchestrator 2019 and I haven’t validated compatibility for Orchestrator 2020 or 2021 yet.
Short of that if you are in a bind, you can go into the Database and modify the associated record in the
dbo.MaintenanceSessions table by setting the
State field to
0 and for consistency though logically not required in my testing setting the
The available State Enum as defined by the MaintenanceSettings model is 0=None, 1=Draining, 2=Suspended