diff --git a/tests/acceptance/features/bootstrap/GraphContext.php b/tests/acceptance/features/bootstrap/GraphContext.php index 6e987541236..acadf6010e5 100644 --- a/tests/acceptance/features/bootstrap/GraphContext.php +++ b/tests/acceptance/features/bootstrap/GraphContext.php @@ -2416,7 +2416,7 @@ public function userTriesToExportGdprReportOfAnotherUserUsingGraphApi(string $us * @throws GuzzleException */ public function getAssignedRole(string $user) { - $userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id') ?? $user; + $userId = $this->featureContext->getAttributeOfCreatedUser($user, 'id') ?? $this->featureContext->getUserIdByUserName($user); return ( GraphHelper::getAssignedRole( $this->featureContext->getBAseUrl(),