[英]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.