Unable to Retrieve OAuth Client Credentials Token (Invalid ClientID)

That’ll be the issue, since curl in powershell actually ins’t curl it’s Invoke-WebRequest

So you’ll have to translate between the two. or just skip curl and move to code.