Hi Johnny, Thanks for your response.
Adding the domain.sharepoint.com to proxy exceptions was part of the fix. The other was to create a smart link. I followed the instructions in the link below which resolved the issue.
community.office365.com/.../using-smart-links-or-idp-initiated-authentication-with-office-365.aspx
Thanks again