Dataverse Web API Metadata: Discover Entity Sets and Navigation Properties

Dataverse metadata describes tables, columns, relationships and entity set names exposed through the Web API. Querying metadata is safer than guessing navigation property names or assuming display labels match API identifiers.

Overview

Use Dataverse Web API metadata endpoints to discover entity set names, logical names and navigation properties for reliable integrations.

Step-by-step implementation

  1. Use the Web API EntityDefinitions metadata endpoint to inspect table definitions and logical names.
  2. Read EntitySetName when constructing collection URLs for CRUD operations.
  3. Inspect OneToManyRelationships and ManyToManyRelationships to identify navigation property names and relationship direction.
  4. Use metadata filters and select only required properties to keep discovery responses manageable.
  5. Cache stable metadata where appropriate, but refresh it after solution changes that alter schema.

Example

GET https://<org>.crm.dynamics.com/api/data/v9.2/EntityDefinitions(LogicalName='account')?$select=LogicalName,EntitySetName,PrimaryIdAttribute

GET https://<org>.crm.dynamics.com/api/data/v9.2/EntityDefinitions(LogicalName='account')/OneToManyRelationships?$select=SchemaName,ReferencingEntityNavigationPropertyName,ReferencedEntityNavigationPropertyName

Common pitfalls

  • Do not use localized display names as API identifiers.
  • Do not assume entity set names are always simple pluralizations of logical names.
  • Refresh metadata after schema deployments that change relationships or columns.

Testing checklist

Validate the discovered entity set and navigation property names against actual requests in a non-production environment.

Conclusion

Prefer explicit platform metadata and documented service behaviour over assumptions. Test the integration with realistic data, permissions and failure conditions before relying on it in production.