private static async Task QueryAuthenticationPolicy(string tenantId, IdentityClient client)
        {
            var getAuthenticationPolicyRequest = new GetAuthenticationPolicyRequest
            {
                CompartmentId = tenantId
            };
            var response = await client.GetAuthenticationPolicy(getAuthenticationPolicyRequest);

            logger.Info($"Minimum password length of Authentication Policy is {response.AuthenticationPolicy.PasswordPolicy.MinimumPasswordLength}");
        }
Exemplo n.º 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            GetAuthenticationPolicyRequest request;

            try
            {
                request = new GetAuthenticationPolicyRequest
                {
                    CompartmentId = CompartmentId
                };

                response = client.GetAuthenticationPolicy(request).GetAwaiter().GetResult();
                WriteOutput(response, response.AuthenticationPolicy);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }