Share via

Calling Microsoft Graph api from SharePoint Designer Workflow

Anonymous
2017-06-05T12:11:20+00:00

Hello Everyone,

I had an strange issue. I am calling Microsoft Graph API from SharePoint Designer 2013 Workflow. I am successful to get the access_token, but when I used this token to call graph uri I am facing below error:

RequestorId: 7efb6ad4-bc80-3351-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentException: JsonWebToken.Issuer != clientId@realm at Microsoft.Activities.Messaging.SendHttpRequest.OnReceiveResponse(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkCallbackWrapper.Invoke(NativeActivityContext context, Bookmark bookmark, Object value) at System.Activities.Runtime.BookmarkWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager) Exception from activity SendHttpRequest HttpGet Switch<String> Sequence Microsoft.SharePoint.WorkflowServices.Activities.CallHTTPWebService Call Graph Sequence Flowchart Sequence ftg.WorkflowXaml_e8d8be20_476d_4f06_9b9f_f755783ea29d

To get token I am calling: https://login.microsoftonline.com/5dfd4cfb-a749-4e84-b7f4-d3656896cee3/oauth2/v2.0/token

To get user mailbox setting using Microsoft graph api I am using : https://graph.microsoft.com/v1.0/users/******@kxxxxsharepoint.onmicrosoft.com/mailboxSettings/automaticRepliesSetting

Above url works on https://www.xxxx.it/

Thanks

[Personal Information removed by MSFT]

Microsoft 365 and Office | SharePoint | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

5 answers

Sort by: Most helpful
  1. Anonymous
    2017-06-10T20:33:55+00:00

    i agree this is a flaw in SPD workflows but there's no harm in posting to the more "expert" forum and I'd submit a service request too.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-06-10T08:47:50+00:00

    Hi David,

    For Graph API related questions, we suggest you post to our MSDN forum for professional support. Thanks for your understanding.

    For your reference: Using Sharepoint Design 2013 HTTP Request (GET) with Access Token Error

    Regards,

    James

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-06-10T01:42:56+00:00

    Sorry Fraser, I don't agree about SharePoint customization forum.  This is in fact a case where SPD is not working properly.  It's not a SharePoint customization issue.  I have the exact same issue.  Please see my reply to originator.  Also, I have documented this in detail and can send you a word doc with screen shots to show the repeatable issue from start to finish.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2017-06-10T01:41:05+00:00

    I have the exact same issue.  It works for me when doing both the token call and the call to graph api when using hurl.it to do the POST/GET.  Then when putting in in SPD workflow, the token POST call works and returns a good token, but the GET to the graph API with the "Bearer TOKEN" in the Authorization header fails with the same error you listed.  I don't agree with Frazer's response below.  This is in fact a case where SPD is not working properly.  It's not a SharePoint customization issue.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2017-06-05T15:22:12+00:00

    Hi Raj,

    I suggest you post at our SharePoint customization forumfor professional support. That is our dedicated channel to handling issues related to using SharePoint Designer to customization SharePoint workflows.

    Your understanding is highly appreciated.

    Regards

    Fraser

    Was this answer helpful?

    0 comments No comments