Connect-FLC

Authenticates and prepares a connection for communicating to the specified Fusion 360 Manage tenant.

Syntax

Providing connection details directly:

Connect-FLC -Tenant <String> -ClientId <String> -ClientSecret <String> -UserId <String> [<CommonParameters>]
<#
PARAMETER
    -Tenant
        Required                true

    -ClientId
        Required                true

    -ClientSecret
        Required                true

    -UserId
        Required                true

    <CommonParameters>
        This cmdlet supports the common parameters: ErrorAction, ErrorVariable
#>

Configuration from Vault:

Connect-FLC [-UseSystemUserEmail] [<CommonParameters>]
<#
PARAMETER
    -UseSystemUserEmail
        Required                false

    <CommonParameters>
        This cmdlet supports the common parameters: ErrorAction, ErrorVariable
#>

Parameters

Type

Name

Description

String

Tenant

The name of the Fusion 360 Manage tenant, which is usually the first part of the URL to your Fusion 360 Manage Site: https://<Tenant>.autodeskplm360.net/plm/mainDashboard

String

ClientId

The Client ID of the registered Forge app is your app’s username required for the two-legged authentication on the Forge Platform

String

ClientSecret

The Client Secret is your app’s password and can be found next to the Client ID in the My Apps section

String

UserId

The e-mail address of a particular user who will perform all the succeeding requests to Fusion 360 Manage

SwitchParameter

UseSystemUserEmail

Whether to use the configured system user’s email or the current users’s email as UserId

Return type

Bool:
$true ← on success.
$false ← on failure with an additional property ‘Error’ containing the Exception/ErrorMessage.

Remarks

Authentication to the Fusion 360 Manage Tenant is achieved through the 2-legged OAuth flow provided by the Forge Platform. The cmdlets use a token that is retrieved using the provided -ClientId and -ClientSecret of the registered Forge app.
Retrieve the Client ID and Secret (see Step 3: Note Down Your Client ID and Secret) of the registered powerPLM app from the Forge portal and make sure the Client ID is whitelisted in the Fusion 360 Manage Configuration.
Because the 2-legged OAuth flow won’t have any information tied to a particular user, FusionLifecycle needs to know via -UserId the e-mail address of a valid user in the system via the -UserId parameter.

When the Cmdlet could successfully establish a connection to Fusion 360 Manage, the PowerShell variable $flcConnection is created and lets you communicate to your tenant directly through the Fusion 360 Manage APIs.

The cmdlet can be invoked without arguments in applications that are already connected to Vault (for example within the Vault Explorer or the Job Processor), so that the globally configured Tenant Settings from the Configuration Manager dialog are used.
In Job Processor environments the email address of the Vault user who queued the the currently processed job is automatically used for the login.
For other Vault applications the email address of the logged-in Vault user is used as the UserId instead.

If the -UseSystemUserEmail switch was passed the system User Email address will be used as the UserId.

If the application already has a Fusion 360 Manage connection for the passed tenant settings, the Cmdlet does not create a new connection but reuses the existing connection to create the $flcConnection variable in the PowerShell session.

Examples

Connect to a Fusion 360 Manage tenant using Two-legged authentication

Connect-FLC -Tenant 'previewcoolorange' -ClientId 'nkerZQhAFEgt9f23Jk8aQ6B2NeRaLSjU' -ClientSecret 'w68qUITbY8RTjGCh' -UserId '[email protected]'

Connect to Fusion 360 Manage using a powerVault connection and the Tenant Setting stored in Vault

Import-Module powerVault
Open-VaultConnection -User 'coolOrange' # Vault user 'coolorange' has email address '[email protected]' assigned

Connect-FLC

$flcConnection.UserId # Returns '[email protected]'

Error handling, analyze why the connection could not be established

$result = Connect-FLC -Tenant 'your_tenant_name' -ClientId 'your_client_id' -ClientSecret 'your_client_secret' -UserId '[email protected]'

if(-not $result) {
   $result.Error #Returns "Authentication to Forge failed!"
}