Example #1
0
        protected override void ProcessRecord()
        {
            var GraphAPI = new GraphAPI();

            // User Exist ?
            var User = GraphAPI.ExecuteGetRow <ResponseUserCreate>("v1.0", $"use9rs/{Identity}");

            if (!System.String.IsNullOrEmpty(User.id))
            {
                return;
            }
            WriteObject(User.id);
        }
Example #2
0
        protected override void ProcessRecord()
        {
            // Parameters
            RequestUserCreate user = new RequestUserCreate();

            user.userPrincipalName        = UserPrincipalName;
            user.displayName              = DisplayName;
            user.passwordProfile.password = Password;
            user.mailNickname             = MailNickname;

            // Create User
            var GraphAPI = new GraphAPI();
            ResponseUserCreate Request = GraphAPI.ExecutePost <ResponseUserCreate>("https://graph.microsoft.com/v1.0/users", user);

            WriteObject(Request, true);
        }
Example #3
0
        protected override void ProcessRecord()
        {
            var GraphAPI = new GraphAPI();

            WriteObject(GraphAPI.ExecuteGetAll <ResponseUser>("v1.0", "users").value, true);
        }
        protected override void ProcessRecord()
        {
            var GraphAPI = new GraphAPI();

            WriteObject(GraphAPI.ExecuteGetAll <ResponseSubscribedSku>("v1.0", "subscribedSkus").value, true);
        }
Example #5
0
        protected override void ProcessRecord()
        {
            var GraphAPI = new GraphAPI();

            WriteObject(GraphAPI.ExecuteGetAll <ResponseUserLicence>("v1.0", $"users/{userPrincipalName}/licenseDetails").value, true);
        }
Example #6
0
        protected override void ProcessRecord()
        {
            var GraphAPI = new GraphAPI();

            GraphAPI.Connect(ClientID, ClientSecret, TenantID);
        }