Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (32 sloc) 2.5 KB



Connects to the API in Delegate365.


Connect-Delegate365 connects to the API in Delegate365. Use this command to connect to your Delegate365 tenant at the beginning of any PowerShell commands or scripts. This command requires a WebApiBaseUrl and a WebApiSasKey parameter. The WebApiBaseUrl is the URI of your Delegate365 tenant, as The WebApiSasKey must be provided by your Delegate365 Portal Admin. It's a key that identifies your admin account and is specific for your use. The key is a string as "123456..". Keep this key well and do not hand it over to other persons, it's your personal access to the API. As output, an informational string is returned. If no error occurs, it should respond with "successfully connected" within some seconds.

After a successful connection is established, you can start working with the Delegate365 cmdlets. Use Get-Command -Module Delegate365 to see a list of available commands in this module, or Get-Help command-name for information about a specific command. Afterwards, use Disconnect-Delegate365 to close the connection.


# Connect to your Delegate365
$apiKey = '<123456...>'
$baseUrl = 'https://<mycompany>'

Connect-Delegate365 -WebApiSasKey $apiKey -WebApiBaseUrl $baseUrl

# After a successful connection, use the Delegate365 cmdlets...

Creates a new session and connects to your Delegate365 API with your key and your portal-URL. Now, the Delegate635 commands can be used.

Parameter Description

The API-key can be generated by a Portal Admin in the Delegate365 portal in the administration/administrators menu for each admin. Select a user and click Edit admin. In the user panel, scroll down to the WebApiKey field and generate a new key if required anytime. Also, the admin must set active in the administrator's list, otherwise the API blocks any request.

Parameter -WebApiSasKey

This key must be provided at the Connect-Delegate365 cmdlet to identify your user and the permissions defined. The command will only return objects within you permission scope. The permissions can be set by the Portal Admins in the web portal.

Parameter -WebApiBaseUrl

This is the base URL of your Delegate365 web portal, e.g. This parameter is required as well to address the corresponding API and must not be omitted.

Back to the overview.