Pass the retrieved roles as a parameter of the onConnected function