Skip to main content

Notifications

Announcements

No record found.

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

  • Dieter Tontsch Profile Picture
    Dieter Tontsch 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
    edmunch 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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans