microsoft-graph-apispring-batchmicrosoft-graph-sdksazure-cloud-servicessharepoint-userprofile

Microsoft Graph API fails to update user birthday and hireDate in GCC high environment


I have a spring batch job that is scheduled to update the hireDate and birthday attributes of a user profile in SharePoint using MS Graph API in the GCC high environment. Below are the details:

PATCH API - https://graph.microsoft.us/v1.0/users/{userPrincipalName}

Payload used -

{
    "hireDate": "2024-07-01T00:00:00Z",
    "birthday": "1982-09-22T00:00:00Z"
}

Below is the snapshot of the API permissions configured in the Azure portal for the registered application. API permissions for the registered application

A sample response received is as follows:

{
    "error": {
        "code": "-1, Microsoft.Office.Server.Directory.DirectoryObjectUnauthorizedAccessException",
        "message": "Attempted to perform an unauthorized operation.",
        "innerError": {
            "date": "2024-08-21T16:15:24",
            "request-id": "8997d5a6-14d6-4d37-94d3-a05470210bfa",
            "client-request-id": "8997d5a6-14d6-4d37-94d3-a05470210bfa"
        }
    }
}

This API was working fine until Aug 7, 2024. Can anyone please help me understand what has changed or what am I doing wrong here?

I have added all the API permissions to registered application in Azure portal. I have also reached out the Microsoft community platform to understand the issue.


Solution

  • Just to close this request, it seems Microsoft realized the issue and put in a fix for it. It is working fine now. No changes were made in the code.