Azure / Synapse-workspace-deployment

MIT License
27 stars 36 forks source link

Unable to fetch service principal token error #7

Closed jeremymaya closed 3 years ago

jeremymaya commented 3 years ago

Hello,

I am trying deploy synapse artifacts using this GitHub Actions but currently getting the following error:

Unable to fetch service principal token, status: 404; status message: Not Found

(node:2160) UnhandledPromiseRejectionWarning: Error
    at Object.<anonymous> (/home/runner/work/_actions/azure/synapse-workspace-deployment/v0.1/dist/index.js:1:147182)
    at step (/home/runner/work/_actions/azure/synapse-workspace-deployment/v0.1/dist/index.js:1:146139)
    at Object.next (/home/runner/work/_actions/azure/synapse-workspace-deployment/v0.1/dist/index.js:1:145424)
    at fulfilled (/home/runner/work/_actions/azure/synapse-workspace-deployment/v0.1/dist/index.js:1:144924)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
(node:2160) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2160) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I checked I was getting a valid response back with the same secret values using the following curl request by following this documentation:

curl -X GET -H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=client_credentials&client_id=<client-id>&resource=<management-resource-endpoint>&client_secret=<application-secret>' \
https://login.microsoftonline.com/<tenantid>/oauth2/token

I've used the following for ADE and RDE values:

Do you have any ideas on what I am doing wrong??? 😢

jeremymaya commented 3 years ago

I was able to resolve the issue by using the following urls for activeDirectoryEndpointUrl and resourceManagerEndpointUrl: