Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] "HTTPError: Request failed with 200" if a ScopeTag is created #178

Closed
CubeWT opened this issue Feb 26, 2024 · 0 comments · Fixed by #179
Closed

[BUG] "HTTPError: Request failed with 200" if a ScopeTag is created #178

CubeWT opened this issue Feb 26, 2024 · 0 comments · Fixed by #179
Labels
bug Something isn't working ready to ship Feature is ready to be included in new version verified The bug has been verified

Comments

@CubeWT
Copy link

CubeWT commented Feb 26, 2024

Describe the bug
If a ScopeTag is created for the first time in a Tenant, IntuneCD throws an error despite the ScopeTag gets imported successfully.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\testuser\AppData\Local\Programs\Python\Python312\Scripts\IntuneCD-startupdate.exe\__main__.py", line 7, in <module>
  File "C:\Users\testuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\IntuneCD\run_update.py", line 308, in start
    run_update(
  File "C:\Users\testuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\IntuneCD\run_update.py", line 229, in run_update
    update_intune(
  File "C:\Users\testuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\IntuneCD\update_intune.py", line 22, in update_intune
    update(path, token, assignment, report, create_groups, remove)
  File "C:\Users\testuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\IntuneCD\update\Intune\update_scopeTags.py", line 128, in update
    post_request = makeapirequestPost(
                   ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\testuser\AppData\Local\Programs\Python\Python312\Lib\site-packages\IntuneCD\intunecdlib\graph_request.py", line 205, in makeapirequestPost
    raise requests.exceptions.HTTPError(
requests.exceptions.HTTPError: Request failed with 200 - {"@odata.context":"https://graph.microsoft.com/beta/$metadata#deviceManagement/roleScopeTags/$entity","id":"11","displayName":"TEST2","description":"","isBuiltIn":false}

To Reproduce

  1. Import a non existing ScopeTag in a Tenant

Expected behavior
The ScopeTag gets imported without the error thrown.

Screenshots

image

Run type (please complete the following information):

  • Mode: 1
  • Client: Pipeline and locla machine
  • Version: 2.1.2

Additional context

@CubeWT CubeWT added the bug Something isn't working label Feb 26, 2024
@almenscorner almenscorner mentioned this issue Feb 29, 2024
@almenscorner almenscorner added fixed Bug has been fixed verified The bug has been verified ready to ship Feature is ready to be included in new version and removed fixed Bug has been fixed labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready to ship Feature is ready to be included in new version verified The bug has been verified
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants