---
schema_version: "1"
id: 9ea56ea93dcf1ad913172901a288355ff3f630a4fa7fab37106b83cb753ed642
title: NetworkAffinity
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_networkaffinity.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_networkaffinity.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 28bbac8ca028cb8b4ac031f7f0e2efb7706051c3dc51c9285d8bc1e81ab33316
description: Represents a junction object that associates a user profile with a Network object, that is, with an Experience Cloud site. Use NetworkAffinity to assign a default Experience Cloud site to a user profile. This object is available in API version 41.0 and later.
---
# NetworkAffinity

Represents a junction object that associates a user profile with a Network object, that is, with an Experience Cloud site. Use NetworkAffinity to assign a default Experience Cloud site to a user profile. This object is available in API version 41.0 and later.

## Supported Calls

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

## Special Access Rules

To work with the NetworkAffinity object, you must have View Setup or Customize Application permission.

## Fields

| Field Name | Details |
| --- | --- |
| NetworkId | 
Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the default Experience Cloud site associated with a user profile.



 |
| ProfileId | 

Type

reference

Properties

CreateFilter, Group, Sort, Update

Description

ID of the user profile the default Experience Cloud site is assigned to.



 |

## Usage

The default Experience Cloud site allows you to stamp site-agnostic email notifications to all users with that profile with the selected site's branding. The default Experience Cloud site also becomes the target destination for email notification links. Site-agnostic email notifications include notifications about records, such as cases, accounts, and opportunities.

The NetworkId field is not updatable through the Apex, REST API, or SOAP API. If you want to change the value for NetworkId, you must delete the record and create one with the right value.