Hi Kumar,
There are two ways to get the currently attached privileges in IdM. First way is to use a custom SQL select. The IDMV_LINK_EXT2 view is appropriate to use because you can access the MSKEY,MSKEYVALUE, privileges and the context togeter.
The second way is to use a pass like to Identity Store to get not to set the values from MXREF_MX_PRIVILEGE attribute.
I think the custom SQL select is simpler and it could be something like this:
select mcothermskey, mcothermskeyvalue,mcExecState, mclinkstate from idmv_link_ext2 where mcExecState =4 ; (4 is fail 1 Ok)
mcothermskey is the mskey of the role/priv
mcothermskeyvalue is the mskeyvalue of the role/priv
mcExecState shows the state of the assignment
mclinkstate shows the state of the entry 0 Ok 1 Pending 2 Deleted
You can check the documentation as well
Views for reference attributes
Regards
Kiril