Error creating a 365 connection

Hi,
I’m trying to create a connection to my 365 server.
I configured the clientId, secret and TeneantID but getting the following error:

{“message”:“The request failed due to failure of a previous request.”,“code”:“SC424”,“suberrors”:[{“message”:“"invalid_client"”,“name”:“Error”}]}

What should I do?