I am new to AG and i am facing the below problem.
We are using listener to connect to the replicas. my boss asked me to create a login and asked me to sync that login in secondary replica as well. I was able to create the login in primary , but when i try to connect the secondary replica i get Login Denied error. So I told my boss that i don't have access on secondary replica. He told me that you don't need access on secondary replica. you can sync the logins logins using script.. So I tried to search online and couldn't find anything which can create logins without access on server.
Can you please help me in this