You can first compute the average PD - few choices would be:
Simple average of the individual PDs
Exposure weighted average of the PDs
If the PDs range is too large, then you might want to bucket them and apply the Vasicek formula to each bucket - this is how Basel approaches it.
Once you have the PD and LGD, then you can solve for the correlation. This is ...