Sentinel-2 metadata

Dear Community,

I am trying to create shadow/non shadow mask for sentinel-2 dataset for which I require Sun elevation and Sun azimuth angles for the desired image. I looked in the metadata file of the particular imagery that I am processing but could not find it.
Can any one help regarding those two parameters? How can i get the information?

Hi,

if you pen the L1C product in SNAP, you can find the sun angles as bands:

To generate this bands we are using the values in the metadata, also available via SNAP:

If you prefer working directly with the metadata file, the info is in the granule metadata: [.SAFE]/GRANULE/[specificGranuleFolder]/MTD_TL.xml