As you know you can setup your On Premises Lync/Skype for Business deployment to work in hybrid mode with Skype for Business Online (as you can do with Exchange).

That said this configuration is not always as smooth and easy as it is for Exchange and you may ended with issues.

Knowing that Microsoft has developed a PowerShell script to help you troubleshoot such situation; even off course a single script may not be able to identify all issues, it will help you anyway as it covers the most frequent misconfiguration the support faced.

You can download it from https://gallery.technet.microsoft.com/Validate-your-Lync-Server-017ed501\

You will need to have also the Skype for Business Online PowerShell module installed (https://www.microsoft.com/en-us/download/details.aspx?id=39366) and run the script from a Lync/SfB front end server with an account granted with RTCUniversalServerAdmins and administration rights on the Skype for Business Online tenant (either Office 365 Global admin or Skype for Business administrator.