Forum Discussion
PowerShell Script Failing with Auth Header and 500 Internal Server Error for REST API
Hi there.
Without knowing anything about the REST API in question, it's nearly impossible to be able to help here.
The only aspect I got curious about is whether the endpoint expects the same authorisation header every call, or whether it's more like the handshake process used on Azure endpoints, where you authenticate first, where if that's successful you get a token in the response, and it's this token you use for subsequent "authentication" in the REST calls.
If the REST API you're using follows a similar design, then this would at least explain why you're getting "does not contain authorisation" errors.
But against that, you said Postman tested worked, and I'm assuming you can see the headers it uses in the first and subsequent calls, so I'm guessing my one thought above may not be the cause.
Again, not having any specifics around this scenario means we're entirely in the dark and reduced to wild guessing.
Cheers,
Lain
Hi Lain,
the REST API being used is part of Oracle Hyperion Financial Data Quality Management Enterprise Edition (FDMEE). More specifically, Job Management API and Authentication.
Thanks,
Drev
- LainRobertsonJul 29, 2024Silver Contributor
Hi, Drev.
Some of Oracle's documentation is locked behind a paywall while some is publicly accessible. I can only access the latter.
A quick search turned up the first article which points the reader to the second:
- FDMEE REST APIs (oracle.com)
- EPM Cloud REST API basic authentication for Classic and OCI (Gen 2) (oracle.com)
Where at the bottom of the second article is a PowerShell-based example on how to format the Authorization header.
Technically, it's not encrypted, only encoded, so the initial string values you'd be pass into the line via the $userName and $userPassword variables would be the actual plain text values for the relevant username and password.
But if what you're already doing matches the Oracle PowerShell example, then I'm unsure what else it might be, as the first article doesn't cover authentication at all.
The following URL may have more information, but it's locked away behind Oracle's paywall, so I'm simply guessing:
Edited to add one final footnote:
When looking at the Oracle example, ensure you correctly use double-quotes and do not change them for single quotes, as the type of quotes used in PowerShell makes a big difference.
When parsing double-quoted strings, PowerShell will perform any variable substitutions and code executions.
Conversely, single-quoted strings are not parsed at all, where everything enclosed in the string is treated literally, i.e. there are no substitutions.
Cheers,
Lain
- dandrevbarrioApr 10, 2025Copper Contributor
Hi Lain,
We found the cause of this issue. It was due to the CPU patching last April 2024 on our server.
CPU April 2024 is certified only with EPM 11.2.16 and later versions. Applying it to any EPM versions below 11.2.16 removes certain JAR files, causing the Planning database refresh to stop working. This is why we are encountering the error: 'Invalid or Missing Authorization Header'. When I access the API URL directly in the browser, I receive the following response:
{
"links": [],
"status": 9,
"details": "EPMFDM-ERROR: Invalid or Missing Authorization Header in request"
}Here's the solution for this issue.
- Since EPM versions below 11.2.16 are not certified with CPU April 2024, please roll back this patch.
- Copy the following JAR files from a working environment to the non-working one at the path "\Oracle\Middleware\oracle_common\modules\thirdparty" and restart the EPM services:
- jackson-core-asl-1.9.13.jar
- jackson-jaxrs-1.9.13.jar
- jackson-mapper-asl-1.9.13.jar
- jackson-xc-1.9.13.jar
This issue has already been documented in the Oracle support Knowledge section. You can check it at this link: https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=369994097692379&parent=SrDetailText&sourceId=3-39870853981&id=3023073.1&_afrWindowMode=0&_adf.ctrl-state=y9psrniep_64
Thanks,
Drev