Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NWH-SAmin5 opened this issue Nov 15, 2024 · 0 comments
Open
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@NWH-SAmin5
Copy link

NWH-SAmin5 commented Nov 15, 2024

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

@NWH-SAmin5 NWH-SAmin5 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant