Skip to main content
Nintex Community Menu Bar
Solved

Nintex Automation Cloud :: Call a Web Service :: graph.microsoft.com

  • May 2, 2023
  • 4 replies
  • 347 views

Forum|alt.badge.img+1

A call to the Microsoft Graph end point can get the associated SharePoint web site URL of a Microsoft Team.

For example: https://graph.microsoft.com/v1.0/groups/<team-id>/sites/root/weburl

where <team-id> is the Microsoft Team identifier.

From NAC how do you get and pass the correct authentication token? An authentication token is required when calling the above URL from the Call a web service action within NAC workflow.

 

Best answer by bsikes

It sounds like this is more of a question on how to correctly use the Microsoft Graph API, and less about how to use NAC to accomplish it.  I’m assuming that this page is the relevant one that describes the process to obtain an authentication token: https://learn.microsoft.com/en-us/graph/auth-v2-service

 

Assuming you have your app registered already, I think step 4 would be the relevant step. 

 

Once you know from the API’s perspective what you would need to do, it will probably a

  1. Call a Web Service action to generate the token
  2. Parse out the token from the response
  3. Whatever Call a Web Service actions you need that would actually use the token parsed in step 2. 

 

I think that’s conceptually what you’ll need, but I have no experience with Microsoft Graph or it’s API to know how it works. 

4 replies

Forum|alt.badge.img+11
  • Contributor
  • May 3, 2023

I’m not sure how you would get the access token in the first place with Microsoft Graph, but as far as how to use it in the “Call a Web Service” action, the NAC documentation has an example. https://help.nintex.com/en-US/nwc/Content/Designer/Actions/Callwebservice.htm

 

 

Looking at the Microsoft Graph api documentation, it doesn’t mention the “accept” header, so that could maybe be left out. 


Forum|alt.badge.img+1
  • Author
  • Rookie
  • May 3, 2023

Thank you.

But from NAC how do you get and pass the correct authentication token? An authentication token is required when calling the above URL from the Call a web service action within NAC workflow.

How do you create an authentication token? There is documentation on how to register Apps and tokens, however, how do you utilize such token and when? 

I am attempting to call a RESTful api in Microsoft Graph. It is indicating that a correct authentication token is not provided. What am I missing?


Forum|alt.badge.img+11
  • Contributor
  • Answer
  • May 3, 2023

It sounds like this is more of a question on how to correctly use the Microsoft Graph API, and less about how to use NAC to accomplish it.  I’m assuming that this page is the relevant one that describes the process to obtain an authentication token: https://learn.microsoft.com/en-us/graph/auth-v2-service

 

Assuming you have your app registered already, I think step 4 would be the relevant step. 

 

Once you know from the API’s perspective what you would need to do, it will probably a

  1. Call a Web Service action to generate the token
  2. Parse out the token from the response
  3. Whatever Call a Web Service actions you need that would actually use the token parsed in step 2. 

 

I think that’s conceptually what you’ll need, but I have no experience with Microsoft Graph or it’s API to know how it works. 


MillaZ
Nintex Employee
Forum|alt.badge.img+22
  • Nintex Employee
  • May 15, 2023

Hi @smcroy 
Did this help you solve your question?