Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Getting Device ID using Entra ID Spoke

Steven Parker
Giga Sage

I am trying to do something that should be simpler than it currently is.  I need to get the Device ID of a PC from our Entra tenant using the DIsplay Name.

 

The only action I see is "Look up Devices Stream"...and I am having no luck with it.  I am just going to be sending one device name to this action, but apparently the filter syntax condition is wrong?  or something else is going on...I can add user to groups, remove user from groups, lookup groups....but when it comes to try and do something similar with a Device nothing is working.

 

Does anyone know the proper filter conditions to enter here or why this would be happening?  

 

I have tried numerous filter conditions including "displayname eq 4VM4V74" with no luck...just hard coding the PC name now to test.

StevenParker_0-1758806857042.png

StevenParker_0-1758807576527.png

 

StevenParker_1-1758806864122.png

StevenParker_2-1758806871670.png

 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
1 ACCEPTED SOLUTION

Steven Parker
Giga Sage

This is the solution for anyone else that runs into this...it was a syntax issue:

StevenParker_0-1758833403214.png

 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

View solution in original post

4 REPLIES 4

Steven Parker
Giga Sage

Has anybody ever used this action before and could provide a screenshot of the action and the filter you used?


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Steven Parker
Giga Sage

This is the solution for anyone else that runs into this...it was a syntax issue:

StevenParker_0-1758833403214.png

 


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Hi Steven,

Thank you for the details. I am facing the same issue. I followed the screenshot and trying to test it with one device name to get the object id but getting below error.

naziamirza_0-1760098793401.png

 

Failed to iterate on data stream: com.glide.transform.transformer.exceptions.InvalidPathException: Could not find path in stream: $.value

 

Can you suggest .

VanPham
Tera Expert

Thanks for sharing Steven!

 

Had the exact same issue, so I was glad to see a post about it. 😁