HodorNV / ALOps

ALOps
59 stars 24 forks source link

Getting errors while using "ALOps Extension API" task for business central saas applications #646

Closed DhasaPrak closed 1 year ago

DhasaPrak commented 1 year ago

We worked on the pipeline based on your inputs and used the “AlOps extension API” task. But unfortunately we ran into the errors “RequestDataInvalid” and “Can’t find the overload for GetExtensions”. I have attached the screenshot of same. Can you please help us through? MicrosoftTeams-image

waldo1001 commented 1 year ago

Hi, please provide yaml and full output, as requested when you create a new issue.. .

DhasaPrak commented 1 year ago

MicrosoftTeams-image (2)

Hi, I have attached the full yaml code and the errors.

waldo1001 commented 1 year ago

Seems your error is here: image

it's clearly a wrong url with the "$(guid)" into it. i see the same url in your yaml .. image

and .. please remove your screenshot with your secrets (always hide your secrets - it's best for you to now create a new secret ;-)).

waldo1001 commented 1 year ago

also your dev-endpoint seems wrong: image

since you supplied one - it will probably use the dev endpoint, and I'd expect "Sandbox" to be in it as well?

DhasaPrak commented 1 year ago

also your dev-endpoint seems wrong: image

since you supplied one - it will probably use the dev endpoint, and I'd expect "Sandbox" to be in it as well?

But the URL displayed in business central admin center is: https://businesscentral.dynamics.com/e57ba7a8-7c87-455f-801f-bd284fe3c0eb/dev How to add Sandbox in it?

DhasaPrak commented 1 year ago

Seems your error is here: image

it's clearly a wrong url with the "$(guid)" into it. i see the same url in your yaml .. image

and .. please remove your screenshot with your secrets (always hide your secrets - it's best for you to now create a new secret ;-)).

image

As suggested I removed the $() from the url and now I'm getting the error that "environment doesn't exist". Please help me

waldo1001 commented 1 year ago

Well - what environments do exist?

DhasaPrak commented 1 year ago

image

These are the two available environments and I have used dev in the code.

waldo1001 commented 1 year ago

In your URL, you have "Sandbox" as environment. That doesn't exist.. . Only "dev" and "Production" exists.

So .. replace "Sandbox" with "dev" or "Production" accordingly ..

DhasaPrak commented 1 year ago

image

Tried as you suggested. Now getting the error as bad request. Can you please help?

DhasaPrak commented 1 year ago

image

Please help me with this.

waldo1001 commented 1 year ago

Dear @DhasaPrak ,

I have helped as much as I can. If it doesn't work, you haven't done the setup correctly.

You can try all over by setting up the S2S authentication by following this blogpost: https://www.kauffmann.nl/2020/09/14/service-to-service-authentication-for-automation-apis-in-business-central/

Then use those tenanid, clientid and clientsecret with the ALOpsExtensionAPI.

Furthermore, if that doesn't work - send me the full yaml and output in text, like I have requested before.. and also as requested when creating a new issue.

waldo1001 commented 1 year ago

@DhasaPrak ?

You can also mail the details to admin@hodor.be .