I have to create custom flow action

NIKHILL72091080
Tera Contributor

"Add to Common Users Group"

 

Graph API

 

/ServiceNow script

 

Description:

 

Add the user to group: <II Card-SG-<Service>-Commoolisers if not already a member.

 

If the group does not exist, continue execution.

 

Group Naming Convention:

 

<GroupName> <IT_Card>-SG-<Service>-CommonUsers

 

Graph API: Get Group by Display Name

 

GET https://graph.microsoft.com/v1.0/groups?$filter=displayName eq *(GroupName

 

Graph API: Add Member to Group

 

POST https://graph.microsoft.com/v1.0/groups/{group-id)/members/$ref

 

"@odata.id":

"https://graph.microsoft.com/v1.0/directory@bjects/(user-id}" {

 

Exception:

 

Flow will throw error if API doesn't return Value. A log is added to the request message.

3 REPLIES 3

Hemanth M
Tera Sage

HI @NIKHILL72091080 ,

 

What's your ask here?? do need the flow skeleton or integration assistance?

 

  

Yes we need to create Custom Flow action for Graph API we have to add user to IT_Card

Hi @NIKHILL72091080 ,

 

Ok, Create a action, use Rest step for different actions, plug them to the flow and enable error handling.

 

Action Step: 

HemanthM1_0-1754587219520.png

 

Error Handling in the flow: 

HemanthM1_1-1754587289692.png