8

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 ?

Ranadheer Reddy
  • 3,930
  • 11
  • 49
  • 73
  • 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. – Halonic May 31 '18 at 13:08
  • Yes, i do have admin access and i used correct environment ID. still it is throwing exception. – Ranadheer Reddy May 31 '18 at 13:18
  • 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. – Halonic May 31 '18 at 13:26
  • 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. – Halonic May 31 '18 at 13:30
  • 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. – Halonic May 31 '18 at 13:33
  • Also look at this https://powerusers.microsoft.com/t5/PowerApps-Ideas/CDM-C-SDK/idi-p/8351 – Halonic May 31 '18 at 13:36

2 Answers2

2

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://docs.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://docs.microsoft.com/en-us/powerapps/developer/common-data-service/overview

Halonic
  • 395
  • 1
  • 12
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

this_is_om_vm
  • 568
  • 4
  • 21