Can't "Script Database As -> CREATE TO" with SSMS 2008R2 and 2016 I created a SQL Login (Login01), mapped to DB user (User01), member of db_owner database role.
When connected locally with this user in SSMS, i try to script out the database (Script Database As -> CREATE TO) and it works as expected.
When connected from a remote machine (same domain, same LAN), it fails (Could not read metadata, possibly due to insuficient access rights). Only way i found to permit it is to grant "View any definition" to the Login.

I dont understand why it only fails when connecting remotely, is this an expected behaviour?

Edit: As said in comments, the issue here has nothing to do with local/remote connection but is related to the SSMS version. I edited title also so the question/answer is easier to find.
I opened a connect feedback here: https://connect.microsoft.com/SQLServer/feedback/details/2869241
as follow:

"A SQL Login, mapped to a database user member of the db_owner role cannot script out the database with "Script Database As" or "Generate Script" task when using SSMS 2008, 2008R2, 2016.
It gets the following error message "Could not read metadata possibly due to insufficient access rights.
Granting the login "View any definition" solve it but this cannot be a workaround for obvious security reason.

(Tested with SQL2008, SQL2014 and SQL2016 instances installed on VMware virtual machines.)"