Thanks for the revert.
Yes my certificate comes from DigiCert - https://www.digicert.com/kb/digicert-root-certificates.htm#intermediates
Why MS does not bundle all the certificates from trusted CA in Windows ?
The user in the question has added the root certificate to extra store before building the chain. Hence it is succeeding.
In my case the leaf has a link to intermediate certificate as well as the root certificate. We can very well export all the certificates. And all the certificates are valid. Do not understand why Build API expects all the certificates to be installed in store.