Attach credentialId in model layer