after executing above commands the expired certificate is still present in the list of keycredentials. II'm using MS Graph version 2.25. So it doesn't works for me.