I'm not sure, but I think it's not possible to do what you want. I think the ony options are:
- Identify legendaries with book of cain.
- Identify legendaries wothout the book of cain (one first, then another, etc.).
- Stash legendaries without identifying them.