Skip to content

New command: m365 pp dataverse table list  #3653

@appieschot

Description

@appieschot

Usage

m365 pp dataverse table list

Description

Lists dataverse tables in given environment

Options

Option Description
-e, --environment <environment> The name of the environment to list all tables for
--asAdmin Set, to retrieve the dataverse tables as admin for environments you are not a member of

Examples

List all tables for the given environment

m365 pp dataverse table list -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339"

List all tables for the given environment as Admin

m365 pp dataverse table list -e "Default-2ca3eaa5-140f-4175-8261-3272edf9f339" --asAdmin

Additional Info

We can retrieve from the runtime endpoints the same way we retrieve the https://europe.api.bap.microsoft.com URL the value for Dynamics and call the following URL to get all details.

We should do a get on the environment details to get the properties that contain the correct url:

"linkedEnvironmentMetadata": {

      "instanceUrl": "https://xx.crm4.dynamics.com/",
      "instanceApiUrl": "https://xx.api.crm4.dynamics.com",
   
    },

And then call something like:

https://ORGURL/api/data/v9.0/EntityDefinitions?%24select=MetadataId%2CIsCustomEntity%2CSchemaName%2CIconVectorName%2CLogicalName%2CEntitySetName%2CIsActivity%2CDataProviderId%2CIsRenameable%2CIsCustomizable%2CCanCreateForms%2CCanCreateViews%2CCanCreateCharts%2CCanCreateAttributes%2CCanChangeTrackingBeEnabled%2CCanModifyAdditionalSettings%2CCanChangeHierarchicalRelationship%2CCanEnableSyncToExternalSearchIndex&%24filter=(IsIntersect%20eq%20false%20and%20IsLogicalEntity%20eq%20false%20and%0APrimaryNameAttribute%20ne%20null%20and%20PrimaryNameAttribute%20ne%20%27%27%20and%20ObjectTypeCode%20gt%200%20and%0AObjectTypeCode%20ne%204712%20and%20ObjectTypeCode%20ne%204724%20and%20ObjectTypeCode%20ne%209933%20and%20ObjectTypeCode%20ne%209934%20and%0AObjectTypeCode%20ne%209935%20and%20ObjectTypeCode%20ne%209947%20and%20ObjectTypeCode%20ne%209945%20and%20ObjectTypeCode%20ne%209944%20and%0AObjectTypeCode%20ne%209942%20and%20ObjectTypeCode%20ne%209951%20and%20ObjectTypeCode%20ne%202016%20and%20ObjectTypeCode%20ne%209949%20and%0AObjectTypeCode%20ne%209866%20and%20ObjectTypeCode%20ne%209867%20and%20ObjectTypeCode%20ne%209868)%20and%20(IsCustomizable%2FValue%20eq%20true%20or%20IsCustomEntity%20eq%20true%20or%20IsManaged%20eq%20false%20or%20IsMappable%2FValue%20eq%20true%20or%20IsRenameable%2FValue%20eq%20true)&api-version=9.1

All details on https://docs.microsoft.com/en-us/power-apps/developer/data-platform/webapi/query-metadata-web-api

As pointed out by @waldekmastykarz as a list command the following properties should be part of the output when using text output: DisplayName (table name), EntitySetName, IsManaged

⚠️ requires additional permissions when going live; needs the Dynamics CRM user_impersonation permissions
image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions