Geeting response "bad argument" while calling "Microsoft Graph API - FindMeeting" without OAuth token

Divya Mawar 1 Reputation point
2020-09-02T19:06:49.14+00:00

I am calling "FindMeeting" graph api using "ClientCredentialProvider" but getting below response:

Code: BadArgument
Message: Invalid user address
Inner error:
Code: UnsupportedScenario
AdditionalData:
date: 2020-09-01T19:48:18
request-id: *********************
ClientRequestId: *********************

Any suggestion or direction is most welcome. My call to API is as follows -

var response = await graphClient.Users[fromEmailAddress]
.FindMeetingTimes(attendees, null, timeConstraint, meetingDuration, maxCandidate, isOrganizerOptional, returnSuggestionReasons, minimumAttendeePercentage)
.Request()
.PostAsync();

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,381 questions
{count} votes

1 answer

Sort by: Most helpful
  1. soumi-MSFT 11,716 Reputation points Microsoft Employee
    2020-09-03T07:09:06.05+00:00

    @Divya Mawar , Thank you for reaching out. If you are using the following MS Graph API https://graph.microsoft.com/v1.0/me/findMeetingTimes, then this API cant be used with Client_Credential flow, since it does not support Application Permissions. More details can be found here.

    For this API to work, you would need to use Authentication_Code Grant Flow, so that users can interactively login and fetch a token and then make this Graph API call and that should work.

    In case you are using any other Graph API from the one mentioned above, do share the same so that we can help you better.

    Hope this helps.

    Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.

    0 comments No comments