SharePoint Online only allows connection by certificate. It is necessary to generate a self-signed certificate that will be sent to the application previously created in AzureAD.

To generate a self-signed certificate see the Microsoft documentation :

https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread

The certificate containing the private and public key (.pfx file), must be imported on the workstations that will use Publish, see chapter: Installation of the certificate on the client workstations