Environment discovery failed. No matching environments matched the given Id - PowerApps
Asked Answered
P

2

9

Am trying to connect to one of my PowerApps environment using the console app given in the following URL

Get started with the Common Data Service SDK

I followed all steps provided in the link. Registered App in AD, created environment and database in powerapps, replaced all values of the app.config sample code with the actual values. But, when i try to run the console app, it shows prompt as expected, once i give access using the prompt, it is showing following error

{"Environment discovery failed. No matching environments matched the given Id of {{my environment GUID}}."}

at following line

var client = ConnectionSettings.Instance.CreateClient().Result

What am i missing here ?

Pharmacopoeia answered 29/5, 2018 at 12:11 Comment(6)
From what I read on that link, once your registered, you have to have admin access. Once you have admin access then you can get the Environment ID (EID). If you don't have admin access then it won't work correctly.Migdaliamigeon
Yes, i do have admin access and i used correct environment ID. still it is throwing exception.Pharmacopoeia
From the comments on several sections, it is no longer supported. There is a few work arounds, but just within the past few months people are saying the same thing. Also looking at everything to get it to work is going to be a 500 mile trip. People are giving work around to access loosely generic data, but the program as a whole, looks like it has been scrapped.Migdaliamigeon
I would look at all the comments. On the link you provided. It's not an error per se, but a nuget problem that MS said to decompile and then recompile, and other stuff, basically what I gathered from other people, this is a dead end. I cannot give you any other answer than what I have given in the answer section. It looks like it may not be updated, All the code is outdated, and it may be more work than actually fooling with. However that is up for you to decide.Migdaliamigeon
On every section there has been something in the comments dating back to January to February of this year about it not working. So I believe you did all you could do. Even with your comment on there. Go back through the comments and several people has questioned MS and there is no definite answer other than its no longer supported.Migdaliamigeon
Also look at this powerusers.microsoft.com/t5/PowerApps-Ideas/CDM-C-SDK/idi-p/…Migdaliamigeon
M
3

From reading everything and looking at the comments, apparently it's no longer available. I took a screen shot with the answer that was just a few months ago. Other people are having the same issue. So what was said is it's no longer available

https://learn.microsoft.com/en-us/common-data-service/entity-reference/cds-sdk-get-started#sample-console-application

enter image description here

This may be a work around https://learn.microsoft.com/en-us/powerapps/developer/common-data-service/overview

Migdaliamigeon answered 31/5, 2018 at 13:14 Comment(0)
R
0

I just checkout a new solution for this issue .Please try to make below possible changes.

please install Nuget package for System.Configuration.ConfigurationManager.

And Just let me know if it's not resolved.Thanks for reading

Recension answered 7/6, 2018 at 9:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.