Cannot connect to atlas cluster using compass

Hello All,

I have created my sandbox cluster in atlas and loaded loadmovies db into it, but when i try to connect it with compass i get the below error

An error occurred while loading navigation: ‘not master and slaveOk=false’: It is recommended to change your read preference in the connection dialog to Primary Preferred or Secondary Preferred or provide a replica set name for a full topology connection.

The lecture notes mention running the rs.slaveOk() from the mongo shell.

Lecture Notes

Note:

In this lecture video we end up getting connected to the Primary node of our Sandbox replica set. In case you get connected to a Secondary node, in order to run queries or commands, you will have to run rs.slaveOk() shell command, to list databases, collections and run queries