Description
Running add-dataverse-api on any action that has a parameter of type
mscrm.crmbaseentity fails with a 404 error. The CLI attempts to fetch
the entity definition for crmbaseentity from the Dataverse metadata API,
but crmbaseentity is an abstract base type — not a real table — so the
API returns 404.
Steps to Reproduce
- Initialize a Power Apps code app with
npx power-apps init
- Run the following:
Failed to get entity definition for table 'crmbaseentity' from organization
'https://[YOUR-ORG].api.crm4.dynamics.com': HTTP error status: 404 for GET
https://[YOUR-ORG].api.crm4.dynamics.com/api/data/v9.0/EntityDefinitions
(LogicalName='crmbaseentity')?$select=MetadataId,LogicalName,DisplayCollectionName,
DisplayName,EntitySetName,Description,HasNotes,IsActivity,IsIntersect,IsManaged,
TableType,IsPrivate,IsLogicalEntity,PrimaryIdAttribute,PrimaryNameAttribute,
ObjectTypeCode,OwnershipType,Privileges,IsAvailableOffline,IsOfflineInMobileClient
&$expand=Attributes,ManyToOneRelationships,OneToManyRelationships,ManyToManyRelationships
Why It Happens
AddToQueue has a parameter Target: mscrm.crmbaseentity. The CLI tries
to fetch the schema for crmbaseentity like any other entity, but per
Microsoft's own documentation, crmbaseentity is defined as:
<EntityType Name="crmbaseentity" Abstract="true" />
It has no real table definition and no EntityDefinitions entry in the API.
The CLI should detect abstract types and skip the schema fetch, falling back
to Record<string, unknown> as documented.
Affected Actions
Any action with mscrm.crmbaseentity parameters is affected. Confirmed:
AddToQueue (Target: mscrm.crmbaseentity)
GrantAccess (Target: mscrm.crmbaseentity)
- Likely also:
Merge, RetrievePrincipalAccess, InitializeFrom, and others
Working vs Broken
- ✅
npx power-apps add-dataverse-api --api-name WhoAmI → works (no entity params)
- ❌
npx power-apps add-dataverse-api --api-name AddToQueue → fails (crmbaseentity param)
Expected Behavior
The CLI should recognize crmbaseentity as an abstract base type, skip the
entity definition lookup, and map it to Record<string, unknown> in the
generated TypeScript service — which is exactly what the documentation already
says this type maps to.
Description
Running
add-dataverse-apion any action that has a parameter of typemscrm.crmbaseentityfails with a 404 error. The CLI attempts to fetchthe entity definition for
crmbaseentityfrom the Dataverse metadata API,but
crmbaseentityis an abstract base type — not a real table — so theAPI returns 404.
Steps to Reproduce
npx power-apps initFailed to get entity definition for table 'crmbaseentity' from organization
'https://[YOUR-ORG].api.crm4.dynamics.com': HTTP error status: 404 for GET
https://[YOUR-ORG].api.crm4.dynamics.com/api/data/v9.0/EntityDefinitions
(LogicalName='crmbaseentity')?$select=MetadataId,LogicalName,DisplayCollectionName,
DisplayName,EntitySetName,Description,HasNotes,IsActivity,IsIntersect,IsManaged,
TableType,IsPrivate,IsLogicalEntity,PrimaryIdAttribute,PrimaryNameAttribute,
ObjectTypeCode,OwnershipType,Privileges,IsAvailableOffline,IsOfflineInMobileClient
&$expand=Attributes,ManyToOneRelationships,OneToManyRelationships,ManyToManyRelationships
Why It Happens
AddToQueuehas a parameterTarget: mscrm.crmbaseentity. The CLI triesto fetch the schema for
crmbaseentitylike any other entity, but perMicrosoft's own documentation,
crmbaseentityis defined as:<EntityType Name="crmbaseentity" Abstract="true" />It has no real table definition and no
EntityDefinitionsentry in the API.The CLI should detect abstract types and skip the schema fetch, falling back
to
Record<string, unknown>as documented.Affected Actions
Any action with
mscrm.crmbaseentityparameters is affected. Confirmed:AddToQueue(Target: mscrm.crmbaseentity)GrantAccess(Target: mscrm.crmbaseentity)Merge,RetrievePrincipalAccess,InitializeFrom, and othersWorking vs Broken
npx power-apps add-dataverse-api --api-name WhoAmI→ works (no entity params)npx power-apps add-dataverse-api --api-name AddToQueue→ fails (crmbaseentity param)Expected Behavior
The CLI should recognize
crmbaseentityas an abstract base type, skip theentity definition lookup, and map it to
Record<string, unknown>in thegenerated TypeScript service — which is exactly what the documentation already
says this type maps to.