almenscorner / IntuneCD

Tool to backup, update and document configurations in Intune
MIT License
289 stars 38 forks source link

"Unable to find resourceId in '$file' file name, when running as pipeline #170

Closed maudlinp closed 8 months ago

maudlinp commented 8 months ago

Describe the bug We have been running IntuneCD via DevOps pipeline successfully for many months. Followed the steps on https://doitpsway.com/how-to-easily-backup-your-intune-environment-using-intunecd-and-azure-devops-pipeline. On 2/13/2024, at 7:00 PM CST, the pipeline failed. It first failed at step "Create Intune Backup" and specified that the application needed to be granted DeviceManagementRBAC.Read.All rights. This was completed and the pipeline moved on past that step. Now at the step called "Find Change Author & Commit The Backup", it fails with the following error.

Exception: /home/vsts/work/_temp/163166ea-6cc7-4511-acd5-865f3d79e280.ps1:227 Line | 227 | throw "Unable to find resourceId in '$file' file name. Pipe … | ~~~~~~~~~~~~~~~ | Unable to find resourceId in 'prod-backup/Scope Tags/Default__0.json' | file name. Pipeline code modification needed, because some changes in | IntuneCD were made probably.

[error]PowerShell exited with code '1'.

To Reproduce Steps to reproduce the behavior: Run the pipeline described in https://doitpsway.com/how-to-easily-backup-your-intune-environment-using-intunecd-and-azure-devops-pipeline

It looks like a few files were updated on 2/13 and 2/14, and they may be the root cause. Thanks for looking into it.

Expected behavior The expectation is that that step in the pipeline can complete successfully and move on in job.

Screenshots If applicable, add screenshots to help explain your problem.

Run type (please complete the following information):

Additional context Add any other context about the problem here.

almenscorner commented 8 months ago

As the output suggests, this is not a bug in IntuneCD but rather an update needed in the script created by Ondrej, I am sure however that he would love to take a look at this :)

Best thing is to open an issue on his repo: https://github.com/ztrhgf/DevOps_Pipelines

maudlinp commented 8 months ago

Thanks for the feedback. I will reach out to Ondrej.

almenscorner commented 8 months ago

Closing issue as it has been raised with the creator of the script.