Microsoft 365 connector from 2021 R1 version fails on beacons prior to version 2019 R2.2 (14.2)
Symptoms
Running the Microsoft 365 connector from FlexNet Manager Suite 2021 R1 on a beacon version prior to 2019 R2.2 (14.2) fails with the following error:
Failed to find required session variable 'ClientSecret' for method 'Get-O365Users'. Check it is specified in the reader configuration file.
Details
Beacons versions prior to 2019 R2.2 (14.2) require a configuration update in order to be able use support added for Client Secret authorization in the Microsoft 365 connector from the FlexNet Manager Suite 2021 R1 version. Without this configuration update, the connector will fail to run due to a missing session variable.
Logging such as the following is produced from the inventory import process when this problem occurs:
2021-07-27 06:58:49,363 [INFO ] Get Users from Office 365 (Transfer data from source 'Office_365' to FNMP) 2021-07-27 06:58:49,425 [ERROR] Failed to find required session variable 'ClientSecret' for method 'Get-O365Users'. Check it is specified in the reader configuration file. 2021-07-27 06:58:49,425 [INFO ] Failed to execute Reader 'Get Users from Office 365' from file C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\microsoft 365\User.xml, at step line 1 Error: The given key was not present in the dictionary. 2021-07-27 06:58:49,425 [INFO ] All retries have been attempted for Reader 'Get Users from Office 365' 2021-07-27 06:58:49,425 [INFO ] Completed with error in 0 seconds. 2021-07-27 06:58:49,441 [ERROR] System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
Resolution
To use a beacon version prior to 2019 R2.2 (14.2) with the Microsoft 365 connector from FlexNet Manager Suite 2021 R1, apply the following configuration:
- Ensure your Microsoft 365 connection details are configured in the beacon UI.
- Make a backup of the following beacon configuration file, and open the file in a text editor with local administrator rights: %ProgramData%\Flexera Software\Beacon\config.xml
- You should find connection details for Microsoft 365 in the <RemoteConnections> section. Add a <Parameter> for ClientSecret with an empty value as follows:
<RemoteConnection> <ConnectionName>CONNECTION_NAME</ConnectionName> <ConnectionParameters> ... <Parameter> <Name>ClientSecret</Name> <Value></Value> <Type>password</Type> </Parameter> </ConnectionParameters> </RemoteConnection>​ - Restart the FlexNet Beacon Engine Windows service.
- Open the Beacon UI and manually run the connection.
This configuration is already in place and does not need to be manually applied for beacon versions 2019 R2.2 (14.2) and later.