diff --git a/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php b/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php
index 8a08cb3d4e..cfcb94750e 100644
--- a/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php
+++ b/core/modules/jsonapi/src/JsonApiResource/ResourceObject.php
@@ -284,7 +284,7 @@ protected static function extractContentEntityFields(ResourceType $resource_type
     // The "label" field needs special treatment: some entity types have a label
     // field that is actually backed by a label callback.
     $entity_type = $entity->getEntityType();
-    if ($entity_type->hasLabelCallback()) {
+    if ($entity_type->label()) {
       $fields[static::getLabelFieldName($entity)]->value = $entity->label();
     }
 
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
index b2d6f1033f..aeee1e3b0f 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiFunctionalTest.php
@@ -271,7 +271,7 @@ public function testRead() {
     ]);
     $response = $this->request('GET', $user_url, [
       'auth' => [
-        $this->userCanViewProfiles->getUsername(),
+        $this->userCanViewProfiles->getAccountName(),
         $this->userCanViewProfiles->pass_raw,
       ],
     ]);
@@ -564,7 +564,7 @@ public function testWrite() {
     ];
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $created_response = Json::decode($response->getBody()->__toString());
@@ -587,7 +587,7 @@ public function testWrite() {
     // 2.1 Authorization error with a user without create permissions.
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->userCanViewProfiles->getUsername(), $this->userCanViewProfiles->pass_raw],
+      'auth' => [$this->userCanViewProfiles->getAccountName(), $this->userCanViewProfiles->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $created_response = Json::decode($response->getBody()->__toString());
@@ -598,7 +598,7 @@ public function testWrite() {
     // 3. Missing Content-Type error.
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Accept' => 'application/vnd.api+json'],
     ]);
     $created_response = Json::decode($response->getBody()->__toString());
@@ -609,7 +609,7 @@ public function testWrite() {
     $invalid_body['data']['id'] = Node::load(1)->uuid();
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($invalid_body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Accept' => 'application/vnd.api+json',
         'Content-Type' => 'application/vnd.api+json',
@@ -625,7 +625,7 @@ public function testWrite() {
     $body_invalid_tags['data']['relationships']['field_tags']['data'][1]['id'] = 'ipsum';
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($body_invalid_tags),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $created_response = Json::decode($response->getBody()->__toString());
@@ -633,7 +633,7 @@ public function testWrite() {
     // 6. Decoding error.
     $response = $this->request('POST', $collection_url, [
       'body' => '{"bad json",,,}',
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
@@ -646,7 +646,7 @@ public function testWrite() {
     // 6.1 Denormalizing error.
     $response = $this->request('POST', $collection_url, [
       'body' => '{"data":{"type":"something"},"valid yet nonsensical json":[]}',
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
@@ -662,7 +662,7 @@ public function testWrite() {
     $malformed_body['relationships'] = $body['data']['relationships'];
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($malformed_body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Accept' => 'application/vnd.api+json',
         'Content-Type' => 'application/vnd.api+json',
@@ -678,7 +678,7 @@ public function testWrite() {
     unset($missing_type['data']['type']);
     $response = $this->request('POST', $collection_url, [
       'body' => Json::encode($missing_type),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Accept' => 'application/vnd.api+json',
         'Content-Type' => 'application/vnd.api+json',
@@ -702,7 +702,7 @@ public function testWrite() {
     ]);
     $response = $this->request('PATCH', $individual_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $updated_response = Json::decode($response->getBody()->__toString());
@@ -722,7 +722,7 @@ public function testWrite() {
     ]);
     $response = $this->request('PATCH', $individual_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->userCanViewProfiles->getUsername(), $this->userCanViewProfiles->pass_raw],
+      'auth' => [$this->userCanViewProfiles->getAccountName(), $this->userCanViewProfiles->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $this->assertEquals(403, $response->getStatusCode());
@@ -740,7 +740,7 @@ public function testWrite() {
     ];
     $response = $this->request('PATCH', $individual_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $updated_response = Json::decode($response->getBody()->__toString());
@@ -748,7 +748,7 @@ public function testWrite() {
     $this->assertEquals("The current user is not allowed to PATCH the selected field (status). The 'administer nodes' permission is required.",
       $updated_response['errors'][0]['detail']);
 
-    $node = \Drupal::entityManager()->loadEntityByUuid('node', $uuid);
+    $node = \Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['uuid' => $uuid]);
     $this->assertEquals(1, $node->get('status')->value, 'Node status was not changed.');
     // 9. Successful POST to related endpoint.
     $body = [
@@ -764,7 +764,7 @@ public function testWrite() {
     ]);
     $response = $this->request('POST', $relationship_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $updated_response = Json::decode($response->getBody()->__toString());
@@ -783,7 +783,7 @@ public function testWrite() {
     ];
     $response = $this->request('PATCH', $relationship_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $this->assertEquals(204, $response->getStatusCode());
@@ -791,7 +791,7 @@ public function testWrite() {
     // 11. Successful DELETE to related endpoint.
     $response = $this->request('DELETE', $relationship_url, [
       // Send a request with no body.
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
@@ -812,7 +812,7 @@ public function testWrite() {
     $response = $this->request('DELETE', $relationship_url, [
       // Remove the existing relationship item.
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => ['Content-Type' => 'application/vnd.api+json'],
     ]);
     $this->assertEquals(204, $response->getStatusCode());
@@ -834,7 +834,7 @@ public function testWrite() {
     ];
     $response = $this->request('PATCH', $individual_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
@@ -863,7 +863,7 @@ public function testWrite() {
     ];
     $response = $this->request('PATCH', $individual_url, [
       'body' => Json::encode($body),
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
       'headers' => [
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
@@ -875,7 +875,7 @@ public function testWrite() {
       $updated_response['errors']['0']['detail']);
     // 14. Successful DELETE.
     $response = $this->request('DELETE', $individual_url, [
-      'auth' => [$this->user->getUsername(), $this->user->pass_raw],
+      'auth' => [$this->user->getAccountName(), $this->user->pass_raw],
     ]);
     $this->assertEquals(204, $response->getStatusCode());
     $response = $this->request('GET', $individual_url, []);
diff --git a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
index def3584a22..5ff020ff3a 100644
--- a/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
+++ b/core/modules/jsonapi/tests/src/Functional/JsonApiRegressionTest.php
@@ -70,7 +70,7 @@ public function testBundleSpecificTargetEntityTypeFromIssue2953207() {
     ]);
     $response = $this->request('GET', Url::fromUri('internal:/jsonapi/comment/tcomment?include=entity_id&filter[entity_id.name]=foobar'), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ]);
@@ -134,7 +134,7 @@ public function testDeepNestedIncludeMultiTargetEntityTypeFieldFromIssue2973681(
     ]);
     $response = $this->request('GET', Url::fromUri('internal:/jsonapi/node/page?include=field_comment,field_comment.entity_id,field_comment.entity_id.uid'), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ]);
@@ -181,7 +181,7 @@ public function testBundlelessRelationshipMutationFromIssue2973681() {
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
       ],
-      RequestOptions::AUTH => [$user->getUsername(), $user->pass_raw],
+      RequestOptions::AUTH => [$user->getAccountName(), $user->pass_raw],
       RequestOptions::JSON => [
         'data' => [
           ['type' => 'user--user', 'id' => $target->uuid()],
@@ -221,7 +221,7 @@ public function testGetTermWhenMultipleVocabulariesExistFromIssue2977879() {
     ]);
     $response = $this->request('GET', Url::fromUri('internal:/jsonapi/taxonomy_term/one'), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ]);
@@ -283,7 +283,7 @@ public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2968972()
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
       ],
-      RequestOptions::AUTH => [$user->getUsername(), $user->pass_raw],
+      RequestOptions::AUTH => [$user->getAccountName(), $user->pass_raw],
       RequestOptions::JSON => [
         'data' => [
           'type' => 'node--journal_article',
@@ -322,7 +322,7 @@ public function testGetNodeCollectionWithHookNodeGrantsImplementationsFromIssue2
     ]);
     $response = $this->request('GET', Url::fromUri('internal:/jsonapi/node/article'), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ]);
@@ -408,7 +408,7 @@ public function testDanglingReferencesInAnEntityReferenceFieldFromIssue2984647()
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
       ],
-      RequestOptions::AUTH => [$user->getUsername(), $user->pass_raw],
+      RequestOptions::AUTH => [$user->getAccountName(), $user->pass_raw],
     ];
     $issue_node->delete();
     $response = $this->request('GET', $url, $request_options);
@@ -469,7 +469,7 @@ public function testThatRoutesAreRebuiltAfterDataModelChangesFromIssue2984886()
     $user = $this->drupalCreateUser(['access content']);
     $request_options = [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ];
@@ -563,7 +563,7 @@ public function testDenormalizeAliasedRelationshipFromIssue2953207() {
     // Test.
     $response = $this->request('PATCH', Url::fromUri(sprintf('internal:/jsonapi/taxonomy_term/tags/%s/relationships/%s', Term::load(1)->uuid(), $public_relationship_field_name)), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
       RequestOptions::HEADERS => [
@@ -637,7 +637,7 @@ public function testFilterByIdFromIssue3015759() {
     ]);
     $response = $this->request('GET', Url::fromUri('internal:/jsonapi/shortcut/default?filter[drupal_internal__id]=' . $shortcut->id()), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ]);
@@ -689,7 +689,7 @@ public function testPatchingDateTimeNormalizedWrongTimeZoneIssue3021194() {
     ]);
     $response = $this->request('GET', Url::fromUri('internal:/jsonapi/node/page/' . $page->uuid()), [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
     ]);
@@ -757,7 +757,7 @@ public function testPatchingDateTimeFieldsFromIssue3021194() {
     ]);
     $request_options = [
       RequestOptions::AUTH => [
-        $user->getUsername(),
+        $user->getAccountName(),
         $user->pass_raw,
       ],
       RequestOptions::HEADERS => [
@@ -801,7 +801,7 @@ public function testPostToIncludeUrlDoesNotReturnIncludeFromIssue3026030() {
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
       ],
-      RequestOptions::AUTH => [$user->getUsername(), $user->pass_raw],
+      RequestOptions::AUTH => [$user->getAccountName(), $user->pass_raw],
       RequestOptions::JSON => [
         'data' => [
           'type' => 'node--page',
@@ -846,7 +846,7 @@ public function testPatchToIncludeUrlDoesNotReturnIncludeFromIssue3026030() {
         'Content-Type' => 'application/vnd.api+json',
         'Accept' => 'application/vnd.api+json',
       ],
-      RequestOptions::AUTH => [$user->getUsername(), $user->pass_raw],
+      RequestOptions::AUTH => [$user->getAccountName(), $user->pass_raw],
       RequestOptions::JSON => [
         'data' => [
           'type' => 'node--page',
@@ -887,7 +887,7 @@ public function testMapFieldTypeNormalizationFromIssue3040590() {
     // Test.
     $url = Url::fromUri(sprintf('internal:/jsonapi/entity_test_map_field/entity_test_map_field', $entity->uuid()));
     $request_options = [
-      RequestOptions::AUTH => [$user->getUsername(), $user->pass_raw],
+      RequestOptions::AUTH => [$user->getAccountName(), $user->pass_raw],
     ];
     $response = $this->request('GET', $url, $request_options);
     $this->assertSame(200, $response->getStatusCode());
diff --git a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
index 7270b63af2..c52bd61252 100644
--- a/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
+++ b/core/modules/jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php
@@ -422,7 +422,7 @@ public function testCreateIndividual() {
     $response = $this->entityResource->createIndividual($resource_type, $request);
     // As a side effect, the node will also be saved.
     $this->assertInstanceOf(JsonApiDocumentTopLevel::class, $response->getResponseData());
-    $this->assertTrue(entity_load_multiple_by_properties('node', ['uuid' => $response->getResponseData()->getData()->getIterator()->offsetGet(0)->getId()]));
+    $this->assertTrue(\Drupal::entityTypeManager()->getStorage('node')->loadByProperties(['uuid' => $response->getResponseData()->getData()->getIterator()->offsetGet(0)->getId()]));
     $this->assertEquals(201, $response->getStatusCode());
   }
 
