I have done the below code and got the solution for my issue, if it helps someone else:
//UserContext.Current cant be used to getlist as there is a
foreach (StaticAddressBook addressBook in StaticAddressBook.GetList(new UserContext(), new TcmUri(System.Configuration.ConfigurationManager.AppSettings["PublicationURI"])))
{
try
{
dictAddressBooks.Add(addressBook.Title, addressBook.Id.ToString());
//to confirm if the user have read permission to the addressbook
//if the user doesnt have permission then exception.
int count = addressBook.GetContacts().Count();
}
catch
{
//Removing the address book if the user gets error on accessing the contacts
dictAddressBooks.Remove(addressBook.Title);
}
}
return dictAddressBooks;
The above code is actually a work around for the solution., and this is working fine.
If there is any other implementation in the cms libraries please update.