No, your UK residence permit must be valid for no less than 3 months after the expiry date of your Azerbaijani visa.