2
votes

I'm using Microsoft Graph to create a new user in my Azure AD. I'm using Graph Explorer to do so, I'm doing a POST request to https://graph.microsoft.com/v1.0/users with the following son in the body:

{
  "accountEnabled": true,
  "displayName": "displayName-value",
  "mailNickname": "mailNickname-value",
  "userPrincipalName": "[email protected]",
  "passwordProfile" : {
    "forceChangePasswordNextSignIn": true,
    "password": "password-value"
  }
}

I keep getting the error: 'No HTTP resource was found that matches the request URI https://outlook.office365.com:444/profile/v1.0/users..'

I dont find anything about this error in google, why is this about? Why is the request URI 'https:/outlook.office35.com:444..' if I'm making the request to 'https://graph.microsoft.com..'?

1
I can see the same error. The URL outlook.office365.com is outlook,or leads at least to login page for outlook. A login with the Microsoft account for the graph explorer is not possible. Reading the documentation it seems that you need extra permissions to post a user. docs.microsoft.com/de-de/graph/api/…Christian
You are right, I tried using my corporate account and I don't get that error anymore, it seems that you cannot use live accounts against Microsoft Graph. However I'm facing another issue. I've created a new AD in my corporate account and I can't seem to post a new usser to it, it keeps posting to my corporate AD in which I don't have admin privileges to create users, can I do this using the Graph Explorer tool?user1306470
I've also tried creating a new app and registering it in the AD I've created but when the app keeps trying to create the new user in my corporate AD. I'm new to this and I don't know how to make it create the user in the AD I've created for my testsuser1306470

1 Answers

4
votes

You can't create "users" with an MSA, each account is a single user. You also cannot create a user in an AAD tenant without User.ReadWrite.All or Directory.ReadWrite.All permissions. Both of these will require consent from a tenant administrator.