0

I'm capable of creating a new Azure User with the Graph.NET API:

POST https://graph.windows.net/myorganization/users?api-version=1.6

I have the token and it's working. But if I already have an user (coming maybe from Office365) how can I add him on Azure?

If I use the same command I get an error like

the user is already registered

Looking at the Microsoft docs, I can't find any help.

Is there any API to use to do it? Is there any useful SDK for c#? I'm actually doing everything with HttpClient.

EDIT: the result I want is the user to see and works with the subscriptions I want him to. Is this feasible with the AD GRAPH API or the GRAPH API?

2
  • Can you clarify? When you say that you are trying to add a user that already exist - does it mean it is an user from another organization - and then you want to add a reference of this user to your organization? Commented Sep 20, 2017 at 23:50
  • Did you consider using the Microsoft Graph instead (See the API for managing users: developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/…). There is (like for the Azure AD Graph) a .NET API as a Nuget package Commented Sep 21, 2017 at 1:33

1 Answer 1

1

There is no need to add it to Azure. Based on my understanding, Both Azure and Office 365 use the Azure Active Directory to manager users.

And for the relationship about Azure with Azure Active Directory, you can refer the link below. And it should be similar with other subscriptions like Office 365.

How Azure subscriptions are associated with Azure Active Directory

And the Azure AD Graph users REST in the post is help to create a new user in the Azure Active Directory. And the error is expected when you create a new user with the exits userPrincipalName.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.