Skip to content

ErrorCode: CultureNotFoundException, Message: Culture is not supported #1839

@NWH-SAmin5

Description

@NWH-SAmin5

Describe the bug

I am calling Privileged Identity Management API and receiving this error

return await this._graphClient
            .api('/roleManagement/directory/roleEligibilitySchedules/filterByCurrentUser(on=\'principal\')')
            .get().then((res) => {
                return res.value;
            });
{"ErrorCode":"CultureNotFoundException","Message":"Culture is not supported.\r\nParameter name: name\r\n* is an invalid culture identifier.","Target":null,"Details":null,
"InnerError":null,"InstanceAnnotations":[],"TypeAnnotation":null}

I have tried other APIs in the Microsoft Graph, they are fine. Get this error only for Privileged Identity Management API so far.

Expected behavior

Sample response

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#roleManagement/directory/roleEligibilitySchedules",
    "value": [
        {
            "id": "77f71919-62f3-4d0c-9f88-0a0391b665cd",
            "principalId": "071cc716-8147-4397-a5ba-b2105951cc0b",
            "roleDefinitionId": "8424c6f0-a189-499e-bbd0-26c1753c96d4",
            "directoryScopeId": "/",
            "appScopeId": null,
            "createdUsing": "77f71919-62f3-4d0c-9f88-0a0391b665cd",
            "createdDateTime": "2022-04-12T14:44:50.287Z",
            "modifiedDateTime": "0001-01-01T08:00:00Z",
            "status": "Provisioned",
            "memberType": "Direct",
            "scheduleInfo": {
                "startDateTime": "2022-04-12T14:44:50.287Z",
                "recurrence": null,
                "expiration": {
                    "type": "afterDateTime",
                    "endDateTime": "2024-04-10T00:00:00Z",
                    "duration": null
                }
            }
        }
    ]
}

How to reproduce

Install using this links

Microsoft Graph JavaScript Client Library
Installation
Via npm

Call this

return await this._graphClient
            .api('/roleManagement/directory/roleEligibilitySchedules/filterByCurrentUser(on=\'principal\')')
            .get().then((res) => {
                return res.value;
            });

SDK Version

3.0.7

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

GraphError: {"ErrorCode":"CultureNotFoundException","Message":"Culture is not supported.\r\nParameter name: name\r\n* is an invalid culture identifier.","Target":null,"Details":null,"InnerError":null,"InstanceAn
notations":[],"TypeAnnotation":null}
      at new GraphError (E:\...\node_modules\@microsoft\microsoft-graph-client\src\GraphError.ts:63:3)
      at Function.GraphErrorHandler.constructErrorFromResponse (E:\...\node_modules\@microsoft\microsoft-graph-client\src\GraphErrorHandler.ts:77:18)
      at Function.<anonymous> (E:\...\node_modules\@microsoft\microsoft-graph-client\src\GraphErrorHandler.ts:104:31)
      at step (E:\...\node_modules\tslib\tslib.js:196:27)
      at Object.next (E:\...\node_modules\tslib\tslib.js:177:57)
      at E:\...\node_modules\tslib\tslib.js:170:75
      at new Promise (<anonymous>)
      at Object.__awaiter (E:\...\node_modules\tslib\tslib.js:166:16)
      at Function.GraphErrorHandler.getError (E:\...\node_modules\@microsoft\microsoft-graph-client\lib\src\GraphErrorHandler.js:87:24)
      at GraphRequest.<anonymous> (E:\...\node_modules\@microsoft\microsoft-graph-client\src\GraphRequest.ts:391:55)

Configuration

Windows Server 2019
NodeJS app v18.17.1
Typescript

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions