Microsoft Graph REST API Property netId is invalid error.

Yoshida 21 Reputation points
2022-10-27T10:32:40.43+00:00

I tried to create a new user by Microsoft Graph REST API v1.0 with below reference and then got following error.
https://learn.microsoft.com/ja-jp/graph/api/user-post-users?view=graph-rest-1.0&tabs=http
What kind of error ? Please tell me where should I check?
Are there different properties needed depending on the situation of the organization I am trying to add?
I don't understand it because netId doesn't seem to matter for adding users.

Property netId is invalid.

I used these properties.

  • accountEnabled : true
  • mail
  • surname
  • givenName
  • displayName
  • mailNickname
  • passwordProfile { forceChangePasswordNextSignIn: true, password: }
  • userPrincipalName
  • usageLocation
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,846 Reputation points Microsoft External Staff
    2022-10-27T13:22:11.83+00:00

    Hi @Yoshida ,

    Please refer to this how-to-fetch-cid-hex-format-of-user-ids.html.

    PUID/NetID was removed from Graph API and there are currently no plans on resurfacing it. The recommendation for apps is to rely on TenantID and ObjectID to identify users and stop relying on PUID/Net ID.

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.