itglue / automation

A place for IT Glue's user community to learn ways of automating their documentation.
Apache License 2.0
99 stars 33 forks source link

No write access with ActiveDirectory.ps1 #23

Closed Absoblogginlutely closed 5 years ago

Absoblogginlutely commented 5 years ago

Script seems to run and the csv output seems to be correct. However script fails to write the data back to ITGlue AD. Active Directory flex asset configuration file found! No flexible asset id was found... creating a new flexible asset. New-ITGlueFlexibleAssets : {"errors":[{"status":401,"title":"Unauthorized","detail":"Unauthorized resource access","source":{"pointer":"id"}}]} At C:\jobs\ITGlueAPI\ActiveDirectory.ps1:338 char:41

Get-itglueusers and get-itglueorganizations returns valid data. The org_id and flexible_asset_type_id from config.psd1 have been confirmed to be correct based on the id in the urls in ITGlue (US version)

Note this is a 2016 AD environment.

Absoblogginlutely commented 5 years ago

In another 2016 environment today I was able to successfully update the AD flexible asset type so this can be closed.