You can always visit get the full metadata of a Power Platform environment (or Dynamics 365) from https://{your-environment}.{region-specific-url}/api/data/v9.2/$metadata
. For example if your environment is hosted in Europe, the URL can be:
https://mytestenvironment.crm4.microsoft.com/api/data/v9.2/$metadata
But sometimes the data can be too much for your browser to digest, specially if you have a plugin that formats or beautifies XML content. In that case you can always use PowerShell or more precisely PSDataverse to download and save the metadata as an XML file. It just takes two lines in Powershell, and the first line is to connect.
Connect-Dataverse "authority=https://login.microsoftonline.com/{tenant-id}/oauth2/authorize;clientid=1950a258-227b-4e31-a9cf-717495945fc2;resource=https://mytestenvironment.crm4.dynamics.com/;device=true"
Send-DataverseOperation "`$metadata" | Select-Object -ExpandProperty Content | Set-Content ".\schema.xml"

If you are not familiar with PSDataverse, just know that it takes only one line to install it. Read more in the official Github repository
Leave a Reply