Microsoft Ad Spoke - MemberOf groups issue

Community Alums
Not applicable

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. 

 

ChrisDoernbrac_0-1718741854997.pngChrisDoernbrac_1-1718741868388.png

 

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?

 

4 REPLIES 4

Community Alums
Not applicable

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.

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
2024-09-26_03-48-15.PNG

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

2024-09-26_03-58-29.PNG

 

Regards

Sumanth16
Kilo Patron

Hi @Community Alums ,

 

Please refer to below thread:

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0951861

https://www.servicenow.com/community/workflow-automation-forum/unable-to-create-serializable-iterator/m-p/2955380

 

If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." 

 

 

Thanks & Regards,
Sumanth Meda