简体   繁体   English

如何使用 C# 以编程方式从 Azure Active Directory 禁用用户

[英]How can I disable a user from an Azure Active Directory programatically with C#

I want to disable an user from the azure active directive using c# code.我想使用 c# 代码从 azure active 指令中禁用用户。 can anyone me help on this?任何人都可以帮助我吗?

Have a look at how you can Use the Microsoft Graph API .查看如何使用 Microsoft Graph API

Microsoft Graph is a RESTful web API that enables you to access Microsoft Cloud service resources. Microsoft Graph 是一种 RESTful Web API,可让您访问 Microsoft 云服务资源。 After you register your app and get authentication tokens for a user or service, you can make requests to the Microsoft Graph API.注册应用并获取用户或服务的身份验证令牌后,可以向 Microsoft Graph API 发出请求。

It has an Update user method you can use to set the accountEnabled property of the user to false .它有一个Update user方法,您可以使用它来将用户的accountEnabled属性设置为false

true if the account is enabled;如果帐户已启用,则为true otherwise, false .否则为false This property is required when a user is created.创建用户时需要此属性。 Supports $filter.支持 $filter。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 C# 以编程方式从 azure B2C Active Directory 中删除用户 - How do I delete a user from an azure B2C Active Directory programatically with C# 如何使用C#以编程方式向Active Directory中的用户设置电子邮件 - How to set email to a user in Active Directory programatically using c# 如何以编程方式删除Azure Active Directory用户? - How to programatically delete Azure Active Directory user? 如何使用C#和现有的Active Directory用户以编程方式创建Exchange 2010邮箱 - How do I programatically create an Exchange 2010 mailbox using C# and an existent Active Directory user 如何从C#中找到活动目录中的用户? - How can you find a user in active directory from C#? 如何使用 c# 以编程方式创建本地 Active Directory? - How can I create a local Active Directory programatically using c#? 在C#中创建新用户后,如何从Active Directory中获取特定用户 - how we can Get specfic User from Active Directory after creating new user in c# C# Active Directory - 如何从注册服务目录 object 加载“certificateTemplates”属性? - C# Active Directory - How can I load the “certificateTemplates” Property from an Enrollment Services directory object? 如何使用C#检查用户是否在Active Directory中具有写权限? - How can I check if a user has write rights in Active Directory using C#? 如何从 C# 中的 Active Directory 用户获取所有属性 - How to get All attributes from an Active Directory user in C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM