Hi Dr. ,
There is no OOB functionality to customize the USER audit access as it is a system settings and completely black box for us. Secondly there is no way to pass http context in the plugin so server side logic will also not work to get the client IP . I would suggest you may proceed with creating custom entity with JS solution and from custom entity you can extract the audit access of particular action.
I have one question here, do you want to create Audit access every time when user logged ? Or for particular action in MSD?
If you are tracking for particular action you may follow below steps -
- Create a custom entity with fields like User lookup,Activity Type (Action Name) , Event Name(Create ,Update,Delete) , Date Time , LastAccess IP.
- Let say you are doing some operation like Modify Customer Address , whenever you update the address you need to call one common CRM JavaScript function which basically responsible to get the client id.
- Now once you will get the client IP you can create one record in the mentioned entity with the details.
- You can create report associated with the custom entity to view the user access for which event.
If you are tracking ip every time when user logged in irrespective of activity type then follow below steps ,it will be a problem when user logged in two or three different machine with same user in this scenario.
- You know there is no straight forward way to call JavaScript function at the time of login , one possibility is to create one Application Ribbon and register one JS function there. Make sure you hide the button .
- In the JS function you can get the client IP.
- Create a custom entity with fields like User Lookup, Activity Type (Action Name) , Event Name(Create ,Update,Delete) ,Date Time , LastAccess IP.
- Update the entity when client IP got changed.
Hope this helps.