Cannot create user after self signup request
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, typescript
- Lĩnh vực
- api
Hướng nghiên cứu
Start by reviewing the Microsoft Graph /users request in the reported Client.initWithMiddleware setup, including the creationType value and the linked self-service sign-up guide. Compare the request with the documented User resource behavior and determine whether the JavaScript SDK is involved; done means identifying a reproducible SDK issue or confirming that the behavior belongs to the Graph API.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report
I am building self sign up approval process by this guide Guide I properly get the request store them in my db, but on creation of users using the graph api i am getting "creationType" is not valid:
`{"code":"Request_BadRequest","message":"Invalid value specified for property 'creationType' of resource 'User'.","details":[{"code":"InvalidValue","message":"Invalid value specified for property 'creationType' of resource 'User'.","target":"creationType"}],"innerError":{"date":"2023-11-","request-id":"fb54cb00-e6b8-46e1-9f17-019931da24d7","client-request-id":""}}`,
Prerequisites
- Can you reproduce the problem?
- Are you running the latest version?
- Are you reporting to the correct repository?
- Did you perform a cursory search?
For more information, see the CONTRIBUTING guide.
Description
I am building self sign up approval process by this guide Guide I properly get the request store them in my db, but on creation of users using the graph api i am getting "creationType" is not valid:
[Description of the bug or feature]
Console Errors: [Is there any console error]
`{"code":"Request_BadRequest","message":"Invalid value specified for property 'creationType' of resource 'User'.","details":[{"code":"InvalidValue","message":"Invalid value specified for property 'creationType' of resource 'User'.","target":"creationType"}],"innerError":{"date":"2023-11-","request-id":"fb54cb00-e6b8-46e1-9f17-019931da24d7","client-request-id":""}}`,
Screenshots: [If applicable, add screenshots to help explain your problem]
Steps to Reproduce
I am making this request
import {ClientSecretCredential} from "@azure/identity";
import { TokenCredentialAuthenticationProvider } from"@microsoft/microsoft-graph-client/lib/src/authentication/azureTokenCredentials/index.js";
import { Client } from"@microsoft/microsoft-graph-client/lib/src/Client.js";
const credential = new ClientSecretCredential(...);
const authProvider = new TokenCredentialAuthenticationProvider(credential, {
// The client credentials flow requires that you request the
// /.default scope, and pre-configure your permissions on the
// app registration in Azure. An administrator must grant consent
// to those permissions beforehand.
scopes: ['https://graph.microsoft.com/.default'],
});
const graphClient = Client.initWithMiddleware({ authProvider: authProvider });
const user = {
displayName: 'displayName',
userPrincipalName: 'displayName_special.domain#EXT#@domain.onmicrosoft.com',
userType: "Guest",
accountEnabled: true,
mail: "displayName@special.domain",
identities: [
{
signInType: "federated",
issuer: "mail",
issuerAssignedId: "displayName@special.domain",
},
{
signInType: "userPrincipalName",
issuer: "domain.onmicrosoft.com",
issuerAssignedId: "displayName_special.domain#EXT#@domain.onmicrosoft.com,
}
],
passwordPolicies: 'DisablePasswordExpiration',
mailNickname: "NICK NAME",
creationType: "SelfServiceSignup",
givenName: "unknown",
surname: "unknown",
jobTitle: "dev"
};
await graphClient.api('/users')
.post(user);
all creationType options in the docs produce errors *described below), I have tried all of them and additionally "SelfServiceSignup" which is the type from the api request for all users.
/**
* Indicates whether the user account was created through one of the following methods: As a regular school or work
* account (null). As an external account (Invitation). As a local account for an Azure Active Directory B2C tenant
* (LocalAccount). Through self-service sign-up by an internal user using email verification (EmailVerified). Through
* self-service sign-up by an external user signing up through a link that is part of a user flow (SelfServiceSignUp).
* Read-only.Returned only on $select. Supports $filter (eq, ne, not, in).
*/
**Expected behavior:** [What you expected to happen]
Expected to create user with self sign up and mail one time pass code.
**Actual behavior:** [What actually happened]
It produce this error:
{"code":"Request_BadRequest","message":"Invalid value specified for property 'creationType' of resource 'User'.","details":[{"code":"InvalidValue","message":"Invalid value specified for property 'creationType' of resource 'User'.","target":"creationType"}],"innerError":{"date":"2023-11-","request-id":"fb54cb00-e6b8-46e1-9f17-019931da24d7","client-request-id":""}},
## Usage Information
Request ID - Value of the `requestId` field if you are receiving a Graph API error response
This is request id and I am not sure if you need client request id
fb54cb00-e6b8-46e1-9f17-019931da24d7
SDK Version - [3.0.7]
- [x] Node (Check, if using Node version of SDK)
> Node Version - [18.17.1]
- Ngôn ngữ chính
- TypeScript
- Star
- 833
- Fork
- 240
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-javascript
-
status:waiting-for-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
-
Is anyone here? Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
microsoftgraph/msgraph-sdk-javascript#2005 · 1 reaction ·
-
Is it really correct that the Javascript version of the graph SDK doesn't offer typed requests? Đang mởstatus:waiting-for-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
-
status:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
microsoftgraph/msgraph-sdk-javascript#1999 · 2 bình luận · 1 reaction ·
-
status:waiting-for-triage type:bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của microsoftgraph/msgraph-sdk-javascript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
0xMiden/bridge-portal#132 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area:tools bug good first issue help wanted priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
newrelic-experimental/preflight#793 · 1 bình luận ·