ztrhgf / DevOps_Pipelines

4 stars 3 forks source link

Failing at Create Intune Backup- unrecognized arguments: -t *** #9

Closed dernerl closed 4 months ago

dernerl commented 4 months ago

Hello, I'm getting following error. image

Do you have any idea what could be causing this?

ztrhgf commented 4 months ago

The error says it all I think. image

Try to modify the pipeline code to use --token instead of -t and let me know if that helps.

https://github.com/almenscorner/IntuneCD/wiki/Backup

dernerl commented 4 months ago

Thanks for your quick reply. Unfortunately it didn't work that way either image

for me, the token looks good, but is there an error? image

ztrhgf commented 4 months ago

Was this pipeline working and then suddenly stopped or was never working for you?

It might be the problem with used AZ modules. I know some version are buggy, so maybe try to use older/newer ones. Also I would output the received token to the pipeline so you can see that it is a valid string. Because it seems like the variable that should contain the token is empty or invalid in some way. Therefore the syntax error.

dernerl commented 4 months ago

okay, I'll try to get to grips with it. These are my first steps in Azure DevOps and so far I've only followed your instructions (https://doitpshway.com/how-to-easily-backup-your-intune-environment-using-intunecd-and-azure-devops-pipeline).

But I'll let you know when I've found something! :-)

ztrhgf commented 4 months ago

OK.

For me, it is working so its probably some moving part like module version, IntuneCD version, etc.

dernerl commented 4 months ago

moving part like module version, IntuneCD version, etc.

sorry for this beginner question, but how can I change such variables in the environment? How do I influence this? Have u any ressource, where I can read more about it?

ztrhgf commented 4 months ago

OK.

How to output the token to validate this part is working: image

How to output that the token got the IntuneCD job image

How to change what IntuneCD version should be used: image

dernerl commented 4 months ago

Thanks for ur input! The token looks good image in the section "Create Intune backup" I see the token output as a secret *** which should also good. Your last tip with "Install IntuneCD" I'm getting an error with "==2.3.1" doesn't found this version image ERROR: Could not find a version that satisfies the requirement IntuneCD==2.3.1 (from versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0b1, 1.4.0b2, 1.4.0, 1.4.1b1, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5b1, 1.4.5b2, 1.4.5, 1.4.6b1, 1.4.6, 1.4.7b1, 1.4.7, 1.4.8b1, 1.4.8, 1.4.9, 1.5.0, 1.5.1, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0b5, 2.0.0, 2.0.1, 2.0.2b1, 2.0.2, 2.0.3b1, 2.0.3b2, 2.0.3, 2.0.4b1, 2.0.4b2, 2.0.4b3, 2.0.4, 2.0.5b1, 2.0.5b2, 2.0.5, 2.0.6, 2.0.7, 2.0.8b1, 2.0.8, 2.0.9b1, 2.0.9b2, 2.0.9b3, 2.0.9b4, 2.1.0b1, 2.1.0, 2.1.1, 2.1.2b1, 2.1.2b2, 2.1.2b3, 2.1.2, 2.2.0b1, 2.2.0b2, 2.2.0b3, 2.2.0b4, 2.2.0b5, 2.2.0b6, 2.2.0b7, 2.2.0, 2.3.0b1, 2.3.0b2, 2.3.0b3, 2.3.0b4, 2.3.0b5, 2.3.0b6, 2.3.0b7, 2.3.0b8, 2.3.0rc1, 2.3.0rc2) But this has looked me at the previous runs and i found this: Does the normal call, only install version 2.2.0? image that would explain why the token cannot be found, since it was only developed with version 2.3.0

dernerl commented 4 months ago

I altered the code to the last version shown in the error message image Which installs IntuneCD but lead me to an other error image Is this a new issue? But 2.3.0 is not the latest version. 2.3.3 cannot be installed either. image Is this an issue at IntuneCD or have you another idea? is 2.3.3 installed on your instance and if so, why is it not installed on your computer and not on mine? :-)

ps: I'm new to the devops world, especially github and obviously also azure devops and pipelines, I'm a classic system administrator. If I'm doing something wrong, please feel free to point it out to me!

pps: Thank you very much for your time, your blog and this troubleshooting have already been very helpful to me! By the way, I successfully got the other blog post about Azure Config to work.

ztrhgf commented 4 months ago

My pipeline installs 2.3.3 version, because without specifying the specific version, by default the newest one gets installed. That was the reason I suggested you to try some older one. image and the pipeline code looks like this image

I am a sys admin too, but it's not enough in today's IT unfortunately :D But I am glad that Azure backup works for you!

IntuneCD errors like you sent are outside my expertise and should be solved by the IntuneCD author by creating a new issue.

Anyway I am a little bit out of ideas right now. What you can try is to install the IntuneCD locally and pass the token (retrieved from the pipeline run) directly to it, if the error will be the same. And maybe even this particular issue you could try to solve with the author himself.

dernerl commented 4 months ago

A Workaround mentioned in https://github.com/almenscorner/IntuneCD/issues/191#issuecomment-2039227955 resolve my problem. With ubuntu-latest an old version of IntuneCD is being installed image with ubuntu-22.04 the latest version of IntuneCD is being installed image

@ztrhgf Thanks again for your support!