Edge 520 I am not getting any credit for intensity minutes for any outdoor cycling activities even though I am maintaining zones 3 and 4 for more than 30 minutes.
What device are you using to capture your heart rate? Please review the article below about how Intensity Minutes are earned:
Edge 520 I am not getting any credit for intensity minutes
That's not surprising, since Edge 520 does not support the feature of Intensity Minutes. You'd need minimally Edge 540, or newer, for that.

Edit: if you use HRM-Pro (Plus), HRM-FIT, or HRM 600, you can get Intensity minutes from it, but you have to pair the strap directly with the phone Connect app.