This project is read-only.


Error when connecting to CRM Online v8.2


Hi, in the past 4 weeks i have been working with setting up proper ALM process for a customer CRM project. For this purpose I have created a trial CRM Online instance and the interactions with the xRM CI framework cmdlets have worked just fine. However, as I tried to do the same against another online instance today, i've this very strange error:

Select-WhoAmI : Metadata contains a reference that cannot be resolved:

If I try against the original instance which is v8.1, all still works fine. Obviously there is some change to this service or the way to communicate to it in the new version 8.2

Any suggestions of ways to overcome this behavior will be highly appreciated!

file attachments

Closed Mar 10 at 3:16 PM by waelhamze


mervynr wrote Dec 15, 2016 at 12:20 PM

We're facing this issue as well. What I understand is that since ACS is deprecated, we're running into this problem. Error below -

ACS10002: An error occurred while processing the SOAP body. ACS50000: There was an error issuing a token. ACS50001: Relying party with identifier '' was not found.

This will need a code upgrade, as per

When can we expect these changes?

waelhamze wrote Jan 4 at 11:05 PM

Yes I am working on a new version that is compatible with CRM 365 and latest version of TFS.

You can check the initial code in here:

KhanPinewood wrote Mar 6 at 9:24 AM

First of all thanks for sharing this really wonderful tool. Since our team has started using SDK 8.x ,i was trying to use your new 8.1 based XRM framework scripts . But i am continuosly getting this error even with Ping command

Select-WhoAmI : Object reference not set to an instance of an object.
At C:\XXX\xRMCIFramework_8.0.17\Ping.ps1:26 char:18
  • ... utingUser = Select-WhoAmI -ConnectionString $CrmConnectionString -Ver ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (:) [Select-WhoAmI], NullReferenceException
    • FullyQualifiedErrorId : System.NullReferenceException,Xrm.Framework.CI.PowerShell.Cmdlets.SelectXrmWhoAmICommand
Is there anything i am missing . I have tried different options but no change in output
.\Ping.ps1 "ServiceUri=; Username=XXXX; Password=XXX"

KhanPinewood wrote Mar 7 at 4:54 AM

Able to fix it .Seems it was looking for OAuthType=Office365 parameter in my connection string

wrote Mar 7 at 9:56 PM

josersm wrote Mar 7 at 9:56 PM

@KhanPinewood, can you share a more full example? I'm running into the same issue.

KhanPinewood wrote Mar 8 at 5:21 AM

My bad i made myself shared typo in the fix :( . For latest 8.1 dll solution provided by wael It should be
"AuthType=Office365;ServiceUri=;; Password=xxxx"

josersm wrote Mar 8 at 2:10 PM

thanks KhanPinewood, that worked for me for both ping and export!

waelhamze wrote Mar 10 at 3:16 PM

Thanks all for helping resolve this.

wrote Mar 10 at 3:16 PM