Assuming you have configured SNMPv3 correctly with group/user/views etc.
For IOS/IOS-XE (Sorry don't have any IOS XR available)
snmp-server enable traps snmp authentication logging trap informational logging history informational logging snmp-trap informational NX-OS on Nexus platforms etc.
snmp-server enable traps snmp authentication logging level snmpd 6