web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Any CRM CMD-lets return internal error 500

(0) ShareShare
ReportReport
Posted on by 25

All of a sudden, none of existing CRM CMD-lets works in PowerShell anymore, all return (500) Internal Server Error.
Not even Get-CrmServer or Get-CrmSetting do work anymore. I mean if I call Get-CRMSetting without any options, it askes me for SettingType, but then if I enter e.g. OAuthClaimsSettings (or any other type) it returns error 500 right away.

It's a Dynamics 365 V8.2 (on-premises) server running all in one, CRM and SQL. It is a Windows 2016 Server with MSSQL2016. and the PowerShell in charge also is launched on the same host, as administrator or not as administrator, no difference.

I wanted to check "Get-CrmSetting -SettingType OAuthClaimsSettings" because I feel like this has been reset to false aver I re-configured Claims-Based Authentication for that CRM. And form that point on my Dynamics 365 App for Outlook does not work anymore, e.g. none can login. And that's why I figured this out.

Other stuff like regular usage of CRM via browser works, also internal and external (IFD) URL login is working.

kind regards,
Dieter

I have the same question (0)
  • Dieter Tontsch Profile Picture
    25 on at
    RE: Any CRM CMD-lets return internal error 500

    From what I can tell yes, I can use other PowerShell command. I can even use like "Get-CrmSetting" - if I only start this one, I do get at the next step where I am asked to introduce SettingType, but at any point where something CRM-related needs to be retrieved, it breaks.

    [System.Environment]::OSVersion.Version for instance also works and returns expected values.

    I can also use Deployment Manager, e.g. I just have disabled an organization test-wise.

    Claims and IFD was reconfigured, but nothing else. On the other side, on ADFS relaying party trusts for claims and ifd where deleted and newly created, but nothing else. And as I said, the system works fine so far, except D365 app for Outlook, but that I guess is because due to re-configuring claims OAuthClaimsSettings switched to false, I assume.

    I also read somewhere that the service account used for CRMDeploymentServiceAppPool (CRMDeploymentServiceAppPool Application Pool identity) needs to have SQL Server sysadmin, I doubt that, but I gave it these privileges, without any susscess.

    stackoverflow.com/.../internal-server-error-in-powershell-cmdlets-for-microsoft-dynamics-crm

  • edmunch Profile Picture
    on at
    RE: Any CRM CMD-lets return internal error 500

    Are you able to run any other PowerShell commands from the server?  How about the Deployment Manager, can you use that tool without issue?  Did anything change in the environment besides reconfiguring claims?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 164

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 121 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans