- Flexera Community
- FlexNet Manager
- FlexNet Manager Forum
- Re: O365 Inventory Gathering Failed
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Printer Friendly Page
O365 Inventory Gathering Failed
We recently connected to Office 365 using an Azure Registered App (as outlined in the FNMSInvAdaptersAndConnectorsReference guide (page 271)).
However, there does not appear to be any data coming into the Flexnet Manager Suite. From what I can gather, this is being interrupted during the Import step, based on the logs below:
2020-02-19 22:00:50,692 [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 remote server returned an error: (400) Bad Request. 2020-02-19 22:00:50,692 [INFO ] All retries have been attempted for Reader 'Get Users from Office 365' 2020-02-19 22:00:50,692 [INFO ] Completed with error in 1 second. 2020-02-19 22:00:50,692 [ERROR] System.Net.WebException: The remote server returned an error: (400) Bad Request. at ManageSoft.Compliance.Importer.Logic.PowerShellDataReader.CheckForPowerShellError() at ManageSoft.Compliance.Importer.Logic.PowerShellDataReader.Read() at ManageSoft.Compliance.Importer.Serialization.IntermediateWriter.WriteData(XmlWriter xmlWriter) at ManageSoft.Compliance.Importer.Serialization.IntermediateWriter.WriteData() at ManageSoft.Compliance.Importer.Logic.XML.SourceToTarget.ExecuteReader(IExecutionContext context, ISourceConnection sourceConn, IDataReader reader) at ManageSoft.Compliance.Importer.Logic.PublicObjectModel.SourceToImportedTableObject.ExecuteReader(IValidatingDataReader reader, SourceToObject STOObject) at ManageSoft.Compliance.Importer.Logic.PublicObjectModel.SourceToObjectImplementation.ExecuteImplementationSQL(IExecutionContext context, SourceToObject sourceToObject) at ManageSoft.Compliance.Importer.Logic.XML.Reader.Execute(IExecutionContext context) at ManageSoft.Compliance.Importer.Logic.ActionExecuter.ReaderExecuter.ExecuteSingleReader(Reader reader, Int32 procedureOrder, Version sourceDatabaseVersion) at ManageSoft.Compliance.Importer.Logic.ActionExecuter.ReaderExecuter.Execute() at ManageSoft.Compliance.Importer.Logic.ComplianceImporter.ProcessExecution(ComplianceReader p_ComplianceReader, Tenant p_Tenant, IExecutionContext p_Context) 2020-02-19 22:00:50,864 [INFO ] Created intermediate package at C:\ProgramData\Flexera Software\Beacon\IntermediateData\I[T=24K9FTSESVP9PW2E][S=Office 365 Connection]_20200220030050.zip
Does anyone know where the error lies here?
This thread has been automatically locked due to inactivity.
To continue the discussion, please start a new thread.
Do you know if you are running an FNMS 2019 R2 or FNMS 2019 R2.1 beacon? We had some instances of such errors, where upgrading to the latest beacon helped address the error. Hence, it may be worth trying out this approach.
I hope this helps.
We're running FNMS 2019 R2. However, I would like to do some more troubleshooting before resorting to upgrading the Beacon.
I'll update this thread once we find a fix.
Hi @lad_denis ,
Facing the same issue with the FNMS 2019 R2.1 setup and Beacon version is 13.8. Let me know if you found any solution for the issue or just upgraded the Beacon version.
I'm checking the Beacon logs for any further hints in the meanwhile.
I too am having this problem with O365 since upgrading to 2019 R2. Errors are very similar.
2021-01-06 21:00:27,576 [INFO ] Running Compliance import with "-s O365 Adapter" parameters
2021-01-06 21:00:27,873 [ERROR] System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Reader\Microsoft Office 365\Logic.ps1'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at ManageSoft.Compliance.Importer.Logic.PowerShellSourceConnection.LoadInitScripts(List`1 initScriptFiles, PowerShell powerShellInstance)
at ManageSoft.Compliance.Importer.Logic.PowerShellSourceConnection.CalculateSecureStringInputsForPsMethod(String psMethod, PowerShell powerShellInstance)
at ManageSoft.Compliance.Importer.Logic.PowerShellSourceConnection.CreateDataReader(Reader readerStep, IExecutionContext context)
at ManageSoft.Compliance.Importer.Logic.PowerShellSourceConnection.CalculateVersion(ReaderConfig sourceDataType)
at ManageSoft.Compliance.Importer.Logic.ComplianceImporter.ProcessExecution(ComplianceReader p_ComplianceReader, Tenant p_Tenant, IExecutionContext p_Context)
It's quite a common question in the forum in regards that the connector fails in this step. Usually this could be related to permissions.
When generating the Token you need to ensure to have these access rights
Cloud Application Administrator and (directory.read.all, reports.read.all, and offline_access)
Please note that reports.read.all do not come in the CAA Role, this permission give access to the reports API behind Graph API.
You also need to select consent on behalf of my organisation after login with the credentials.