Your web server is not properly set up to resolve "/ocm-provider/". This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in ".htaccess" for Apache or the provided one in the documentation for Nginx at it's documentation page ↗. On Nginx those are typically the lines starting with "location ~" that need an update.
I have previously dealt with redirect issues in my Nextcloud setup, so when I, this time, encountered an issue with ocm-provider I was actually quite annoyed. This is another reason why I prefer to route everything through index.php from the start, as you will avoid such issues almost entirely.
I learned the reason why it was now complaining about the ocm-provider thing was simply because the directory did not exist in the Nextcloud root folder – no amount of redirects is going to fix it when the directory does not exist! Again, later I learned you should just route it to Nextcloud's index.php – but man, this was an irritating waste of time to deal with.
To fix it, you should instead update to Nextcloud 27.1.3+, as the problem may have been fixed in 27.1.3.
However, even after updating I was still having the issue, so I was back at messing with my redirects and server configuration; adding the following to my Apache v-host seems to have finally fixed the issue:
RewriteRule ^ocm-provider/(.*) /index.php [QSA,L]
Remember to also reload your Apache configuration:
sudo service apache2 reload
The problem is also discussed at GitHub.