I have a Web Api to access CRM and get the CRM ApiUrl using https://globaldisco.crm.dynamics.com/api/discovery/v2.0/Instances
and get 2 value in array
{
"@odata.context": "">10.0.1.33:20229/.../$metadata
"value": [
{
"IsUserSysAdmin": false,
"Region": "OCE",
"Purpose": "",
"StatusMessage": 6,
"TrialExpirationDate": "0001-01-01T00:00:00Z",
"OrganizationType": 12,
"TenantId": "daea8483-3c8c-4bdf-ae25-xxxxxxx",
"EnvironmentId": "Default-daea8483-3c8c-4bdf-ae25-xxxxxxxx",
"DatacenterId": "4f4c4dee-6471-44f7-b9e7-xxxxxxxx",
"DatacenterName": null,
"Id": "f8f5e670-3702-42f3-9fd6-xxxxxxxxxx",
"UniqueName": "f8f5e670370242f39fd657xxxxxxxx",
"UrlName": "orgxxxxxxx",
"FriendlyName": "xxxxxxxxx (default)",
"State": 0,
"Version": "9.2.22113.172",
"Url": "https://orgxxxxxxxx.crm6.dynamics.com",
"ApiUrl": "https://orgxxxxxxx.api.crm6.dynamics.com",
"LastUpdated": "2022-12-27T21:46:15.1910295Z",
"SchemaType": "Standard"
},
{
"IsUserSysAdmin": true,
"Region": "OCE",
"Purpose": null,
"StatusMessage": 6,
"TrialExpirationDate": "2023-01-26T00:00:00Z",
"OrganizationType": 11,
"TenantId": "daea8483-3c8c-4bdf-ae25-xxxxxxxxxxxx",
"EnvironmentId": "d66108c4-1b0f-e72c-a15d-xxxxxxxxxxxx",
"DatacenterId": "6aff9720-2913-4b57-89cb-xxxxxxxxxxxx",
"DatacenterName": null,
"Id": "d3829f7b-f789-4dc6-883c-xxxxxxxxxxx",
"UniqueName": "unqd3829f7bf7894dc6883xxxxxxxx",
"UrlName": "orgxxxxxxxxx",
"FriendlyName": "Sales Trial",
"State": 0,
"Version": "9.2.22113.172",
"Url": "https://orgxxxxxxx.crm6.dynamics.com",
"ApiUrl": "https://orgxxxxxxx.api.crm6.dynamics.com",
"LastUpdated": "2022-12-28T03:00:42.1241855Z",
"SchemaType": "Full"
}
]
}
which instance that we can use for access(create, update, delete) leads? currently I'm using the Sales Trial
but I don't know exactly how to filter it because when I use the default one, I can't access the CRM and get Error: The user is not a member of the organization.