Graph v1 userPurpose API support for graph.microsoft.us

Rono, Jacob 21 Reputation points
2022-09-09T04:45:45.893+00:00

Hi,

We are using userPurpose Graph Beta API to identify the mailbox type of the user in our backup application.
This beta API is working fine with the Graph API endpoint https://graph.microsoft.com
But is failing with error for Office 365 GCC high customers with Graph API endpoint https://graph.microsoft.us
Below is a sample request response :

Request : https://graph.microsoft.us/beta/users/<emailid>/mailboxSettings/userPurpose

Response Error : {u'message': u"Resource not found for the segment 'userPurpose'.", u'code': u'BadRequest'}}

We have the following queries :

  1. Does userPurpose Graph API supported for Graph API endpoint https://graph.microsoft.us?
  2. If it is supported can we check why we are getting this error for only Graph API endpoint https://graph.microsoft.us
    ?
  3. If it is not supported is there any alternate API we can use to fetch the mailbox type of the user?
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,644 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vicky Kumar (Mindtree Consulting PVT LTD) 1,156 Reputation points Microsoft Employee
    2022-09-12T04:19:57.353+00:00

    This is supported in graph explorer for beta endpoint, could you please try with API - https://graph.microsoft.com/beta/users/userId6/mailboxsettings/userPurpose

    Note : kindly use userId in place of emailId

    239885-image.png

    Hope this helps .

    ----------

    If the answer was helpful kindly, upvote it and mark as verified, if you have any query, please feel free to ask in comment box.
    Thanks


  2. Zehui Yao_MSFT 5,831 Reputation points
    2022-09-12T09:00:19.64+00:00

    I test locally and can repeat the error through the token I obtain form https://login.microsoftonline.com

    I did some research, it seems like special national cloud require special Azure endpoint for acquire token. So please try registering your application in https://portal.azure.us and request token from https://login.microsoftonline.us Here is the documentation for your reference.
    240025-image.png
    240051-image.png
    Hope this can help. Best Regards.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.