As the MKR1300 is designed to run on battery, it conveniently includes a voltage divider on board attached to PB08 with a 680k/330k so it should be measurable against the internal 1v ref.
However if you try
int sensorValue = analogRead(ADC_BATTERY);
It fails as ADC_BATTERY is undefined.
Is there a declared variable (in MKRWAN.h) that lets me read the PB08 value or an equivalent?
It seems reducndant to have to add another resister divider to A0 or A1 when it is built in.