Aims. HD142527 is one of the most frequently studied Herbig Ae/Be stars with a transitional disk that hosts a large cavity that is up to about 100 au in radius. For this reason, it has been included in the guaranteed time observation (GTO) SpHere INfrared survey for Exoplanets (SHINE) as part of the Spectro-Polarimetric High-contrast Exoplanet REsearch (SPHERE) at the Very Large Telescope (VLT) in order to search for low-mass companions that might explain the presence of the gap. SHINE is a large survey within about 600 young nearby stars are observed with SPHERE with the aim to constrain the occurrence and orbital properties of the giant planet population at large (> 5 au) orbital separation around young stars. Methods. We used the IRDIFS observing mode of SPHERE (IRDIS short for infrared dual imaging and spectrograph plus IFS or integral field spectrograph) without any coronagraph in order to search for and characterize companions as close as 30 mas of the star. Furthermore, we present the first observations that ever used the sparse aperture mask (SAM) for SPHERE both in IRDIFS and IRDIFS_EXT modes. All the data were reduced using the dedicated SPHERE pipeline and dedicated algorithms that make use of the principal component analysis (PCA) and reference differential imaging (RDI) techniques. Results. We detect the accreting low-mass companion HD142527B at a separation of 73 mas (11.4 au) from the star. No other companions with mass greater than 10 M J are visible in the field of view of IFS (∼ 100 au centered on the star) or in the IRDIS field of view (∼ 400 au centered on the star). Measurements from IFS, SAM IFS, and IRDIS suggest an M6 spectral type for HD142527B, with an uncertainty of one spectral subtype, compatible with an object of M= 0.11 ± 0.06 M and R= 0.15 ± 0.07 R . The determination of the mass remains a challenge using contemporary evolutionary models, as they do not account for the energy input due to accretion from infalling material. We consider that the spectral type of the secondary may also be earlier than the type we derived from IFS spectra. From dynamical considerations, we further constrain the mass to 0.26 +0.16 −0.14 M , which is consistent with both our spectroscopic analysis and the values reported in the literature. Following previous methods, the lower and upper dynamical mass values correspond to a spectral type between M2.5 and M5.5 for the companion. By fitting the astrometric points, we find the following orbital parameters: a period of P= 35 − 137 yr; an inclination of i = 121 − 130 • , a value of Ω = 124 − 135 • for the longitude of node, and an 68% confidence interval of ∼ 18 − 57 au for the separation at periapsis. Eccentricity and time at periapsis passage exhibit two groups of values: ∼0.2-0.45 and ∼0.45-0.7 for e, and ∼2015-2020 and ∼2020-2022 for T 0 . While these orbital parameters might at first suggest that HD142527B is not the companion responsible for the outer disk truncation, a previous hydrodynamical analysis of this system showed that they are compatible with...