嗨
我是Azure Active Directory工具的新手.我想自动将用户创建从生产环境自动创建到Azure AD,现在可以手动执行此操作.您能指导我如何建立API连接吗,我尝试了Graph API但未能建立 连接.我能够通过developer.microsoft网站成功获取用户.但是POST无法在此工作.
解决方案
你好 Sethu67 ,
您需要确保在尝试创建用户的azure AD中具有用户创建权限.通常我们的帐户必须有 用户帐户管理员角色或 目录中的全局管理员角色.
您可以找到Grprah API参考来创建用户 这里. Graph API快速入门可以通过示例代码帮助您.另外,如果您的目标是与您的Azure AD一起批量创建多个用户,我建议如果您的用例不需要使用REST API,则建议通过Power Shell进行操作. 请浏览以下链接,了解如何使用Powershell在Azure AD中创建用户.
docs.microsoft/zh-CN/powershell/azure/active-directory/new-user-sample?view=azureadps-2.0 docs.microsoft/zh-cn/powershell/module/azuread/new-azureaduser?view=azureadps-2.0 docs.microsoft/zh-cn/office365/enterprise/powershell/create-user-accounts-with-office-365-powershell
如果您有任何其他疑问,请随时告诉我们,如果此答案对您有帮助,请将其标记为答案,以使社区中的其他人受益.
谢谢.
Hi
I am new to Azure Active Directory tool. I want to automate user creation from my production environment to Azure AD, which is performed manually now. Can you guide me on how to establish a API connection, I have tried Graph API but failing to establish a connection. I was able to successfully GET users through developer.microsoft site. But POST wont work there.
解决方案HelloSethu67,
You would need to make sure that you have user creation rights in azure AD where you are trying to create users . generally our account must have user account administrator role or global admin role in the directory.
You can find the Grprah API reference to create users here. The Graph API quick-start can help you with sample codes on how to do it . Alternatively if creating multiple users in bulk withi your Azure AD is your goal , I woudl suggest doing it via power shell if using REST API is not a requirement for your use case. Please go through the following links on how to use powershell to create users in Azure AD .
docs.microsoft/en-us/powershell/azure/active-directory/new-user-sample?view=azureadps-2.0 docs.microsoft/en-us/powershell/module/azuread/new-azureaduser?view=azureadps-2.0 docs.microsoft/en-us/office365/enterprise/powershell/create-user-accounts-with-office-365-powershellIn case you have any further queries , feel free to let us know and if this answer helps you , please mark it as answer so that it can benefit others in the community .
Thank you.
更多推荐
使用API在Azure AD中创建用户
发布评论