---
title: "GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships"
method: GET
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships"
tags: ["Relationships"]
---

# GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships

`GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships`

## Request

- Base URL: `https://management.azure.com`
- URL: `https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/relationships`
- Auth: OAuth 2
  - Implicit: `https://login.microsoftonline.com/common/oauth2/authorize`
  - Scopes: `user_impersonation`

Gets all relationships in the hub.

## Path parameters

- `resourceGroupName` string, required
- `hubName` string, required
- `subscriptionId` string, required

## Query parameters

- `api-version` string, required

## Response `200`

OK. Successfully get all the relationships in the hub.

- RelationshipListResult: The response of list relationship operation.
  - `value` RelationshipResourceFormat[]: Results of the list operation.
    - `id` string: Resource ID.
    - `name` string: Resource name.
    - `type` string: Resource type.
    - `properties` RelationshipDefinition: The definition of Relationship.
      - `cardinality` 'OneToOne' | 'OneToMany' | 'ManyToMany': The Relationship Cardinality.
      - `displayName` object: Localized display name for the Relationship.
      - `description` object: Localized descriptions for the Relationship.
      - `expiryDateTimeUtc` string, date-time: The expiry date time in UTC.
      - `fields` PropertyDefinition[]: The properties of the Relationship.
        - `arrayValueSeparator` string: Array value separator for properties with isArray set.
        - `enumValidValues` ProfileEnumValidValuesFormat[]: Describes valid values for an enum property.
          - `value` integer: The integer value of the enum member.
          - `localizedValueNames` object: Localized names of the enum member.
        - `fieldName` string, required: Name of the property.
        - `fieldType` string, required: Type of the property.
        - `isArray` boolean: Indicates if the property is actually an array of the fieldType above on the data api.
        - `isEnum` boolean: Indicates if the property is an enum.
        - `isFlagEnum` boolean: Indicates if the property is an flag enum.
        - `isImage` boolean: Whether the property is an Image.
        - `isLocalizedString` boolean: Whether the property is a localized string.
        - `isName` boolean: Whether the property is a name or a part of name.
        - `isRequired` boolean: Whether property value is required on instances, IsRequired field only for Interaction. Profile Instance will not check for required field.
        - `propertyId` string: The ID associated with the property.
        - `schemaItemPropLink` string: URL encoded schema.org item prop link for the property.
        - `maxLength` integer: Max length of string. Used only if type is string.
        - `isAvailableInGraph` boolean: Whether property is available in graph or not.
        - `dataSourcePrecedenceRules` DataSourcePrecedence[]: This is specific to interactions modeled as activities. Data sources are used to determine where data is stored and also in precedence rules.
          - `dataSource` DataSource: Data Source is a way for us to know the source of instances. A single type can have data coming in from multiple places. In activities we use this to determine precedence rules.
            - `name` string: The data source name
            - `dataSourceType` 'Connector' | 'LinkInteraction' | 'SystemDefault': The data source type.
            - `status` 'None' | 'Active' | 'Deleted': The data source status.
            - `id` integer: The data source ID.
            - `dataSourceReferenceId` string: The data source reference id.
          - `precedence` integer: the precedence value.
      - `lookupMappings` RelationshipTypeMapping[]: Optional property to be used to map fields in profile to their strong ids in related profile.
        - `fieldMappings` RelationshipTypeFieldMapping[], required: Maps a profile property with the StrongId of related profile. This is an array to support StrongIds that are composite key as well.
          - `profileFieldName` string, required: Specifies the fieldName in profile.
          - `relatedProfileKeyProperty` string, required: Specifies the KeyProperty (from StrongId) of the related profile.
      - `profileType` string, required: Profile type.
      - `provisioningState` 'Provisioning' | 'Succeeded' | 'Expiring' | 'Deleting' | 'HumanIntervention' | 'Failed': Provisioning state.
      - `relationshipName` string: The Relationship name.
      - `relatedProfileType` string, required: Related profile being referenced.
      - `relationshipGuidId` string: The relationship guid id.
      - `tenantId` string: The hub name.
  - `nextLink` string: Link to the next set of results.

---

[API](https://skmtc.dev/azure/apis/customer-insights-microsoft-customerinsights-customerinsight.md) - [All operations](https://skmtc.dev/azure/apis/customer-insights-microsoft-customerinsights-customerinsight/llms.txt) - [OpenAPI document](https://skmtc.dev/azure/apis/customer-insights-microsoft-customerinsights-customerinsight/revisions/1a3e19f598e0?raw)
