Microsoft Ad Spoke - MemberOf groups issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 01:19 PM
I am using the OOB Look up User action which returns a user object. One of the values is memberof which is an array,string of the all the groups a user belongs to. This works fine but when I try to loop through those I get an error.
I see that other folks have had the same issue as well. https://www.servicenow.com/community/developer-forum/parse-json-string-from-microsoft-ad-spoke-looku... had a solution but didn't provide enough detail. I am not sure how they got the memberof into JSON. Either way, has anyone run into this and found a solution?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 12:13 AM
Hi @Community Alums
Refer below posts which could be helpful :
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 08:41 AM
I have seen all of these posts hence why I created a new post. These posts don't solve my issue which is that I need to be able to access an array which is part of a complex object.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 11:05 AM - edited 09-25-2024 11:12 AM
Hi
Not sure if you already found this but incase anyone else has the same issue please take a look at https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1701059
You need to create a copy of the existing action with a new output variable
Label - Member Of
Name - memberof
Type - Array.String
After creating the new output variable drag and drop the 'Member Of' Data object from the 'Post Processing & Error Handing' section
After saving and publishing, if you use the new action and the new Member now it should give you the expected array data containing the groups of the user found
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 09:11 AM
Hi @Community Alums ,
Please refer to below thread:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0951861
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thanks & Regards,
Sumanth Meda