As the industry is pushing for life extension of existing oil & gas fields, they have to cope with an ageing infrastructure. Aging steel structures need careful considerations with respect to degradation mechanisms as corrosion, fatigue and hydrogen embrittlement. In particular, the hydrogen embrittlement (HE) represents a degradation of material that is usually not detectable prior to the final leakage or component fracture which can lead to not only huge economic losses but also ecologic harms. For this reason, HE has been extensively studied for more than 100 years. Thanks to the increase of computational power during the last decades this problem can be also studied using the atomistic simulations like the DFT calculations or molecular dynamics. In this theoretical study we use the DFT simulations to determine the tensile strength of the Σ5 (210) and Σ5 (310) tilt grain boundaries in Ni and Fe, respectively. The tensile tests were performed for the clean grain boundary as well as for the grain boundary with segregated hydrogen. In the presented simulations we used a new tensile test method where all stress tensor components were taken into account. Thus, we studied the influence of individual stress tensor components on the resulting strength. The obtained results revealed that multiaxiality of the loading signifficantly affects the calculated strength values.