Yrityksen käyttäjille tunnuksille voimassaoloa?

Anonymous
2023-08-25T11:00:30.92+00:00
Onko mahdollista yrityksille tunnuksille määrittää jokinlaisen voimassaolon? eli jos olisi harjoittelija tai vieras tunnus onko mahdollista azure active directory määrittää säännön tai policy asetuksen, että kyseinen henkilön tunnukset on voimassa vaikkapa viikon, kuukauden tai vuoden tai määräaikaisen. Kun aika lähestyy sitä päivää niin on n. muutaman viikon aikaa lähettää käyttäjälle, että tunnukset pian sulkeutuu.



Jos käyttäjä reagoi ennen sitä päättymisen päivää voiko sitä voimassaoloa perua ja miten sekä mitä kaikkea määrityksiä pitää määrittää? Vaikappa henkilö on liittynyt organisaatioon yritykseen ja tyyppi member, sekä tunnukset on voimassa 24.11.2023 asti, mutta jos hän reagoi 10.11.2023 niin aktivoidaan ne tunnukset seuraavan 6kk eli 30.5.2024 asti.



Eli kuinka tämmöistä määritystä voidaan tehdä? voiko tätä asettaa microsoft admin centerissä, jos voi miten? entä jos azure active directory? tai onko powershell mahdollisuutta?



Yritin, jopa "Set-ADAccountExpiration" komentoa, sekään ei auttanaut, sekä en ymmärrä miksi se ei tykkää tuosta -datetime funktiosta "30/11/2023"?

Eli nämä komennot powershell ei toimineet:
 Set-ADAccountExpiration -Identity david klark -DateTime "8/30/2023 4:04 PM" 

Set-ADAccountExpiration : A positional parameter cannot be found that accepts argument 'klark'. 

At line:1 char:1 

+ Set-ADAccountExpiration -Identity david klark -DateTime "8/30/20 ... 

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

    + CategoryInfo          : InvalidArgument: (:) [Set-ADAccountExpiration], ParameterBindingException 

    + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.ActiveDirectory.Management.Commands.SetADAccountExpiration 

Set-ADAccountExpiration -Identity *** Sähköpostiosoite on poistettu tietosuojasyistä *** -DateTime "8/30/2023 2:04 PM


Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,462 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,329 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rich Matheisen 45,906 Reputation points
    2023-08-25T15:38:43.0666667+00:00

    For the 1st problem, the value of the "-Identity" parameter contains a space. Surrounding the value with quotation marks (single or double) is necessary.

    However, it's unlikely that "david klark" is an acceptable value for use an identifier. These are the types of values that can be used (taken from the help for the cmdlet):

    -Identity
        Specifies an Active Directory account object by providing one of the following property values.     
       The identifier in parentheses is the Lightweight Directory Access Protocol (LDAP) display name
       for the attribute. The acceptable values for this parameter are:
          . distinguished name
          . GUID (objectGUID)
          . security identifier (objectSid)
          . SAM account name (sAMAccountName)
    

    For the second problem, the date format may not be correct for the local sessions culture. While "8/30/2023" would be acceptable in the USA, if the culture for the session was Finnish that date format is incorrect. I didn't find a culture specific to Finland to know what an acceptable format might be.

    One way around this is to not use an abbreviated representation of the date but to use the "Get-Date" cmdlet and the parameters "-Year", "-Month", and "-Day" to remove the ambiguity. For example:

    $u = Get-ADUser -Filter "name -eq 'david klark'"
    Set-ADAccountExpiration -Identity $u.distinguishedName  -DateTime (Get-Date -Day 30 -Month 8 -Year 2023)
    

    I hope the Google translation was accurate enough for me to understand your question.


  2. ftre 0 Reputation points
    2023-08-28T15:55:18.11+00:00

    newtoki@ Yrityksen käyttäjätunnusten voimassaoloaika riippuu monista tekijöistä, kuten tietoturvaan, tietosuojaan ja organisaation käytäntöihin liittyvistä tarpeista. Alla on joitakin seikkoja, jotka yritysten tulisi ottaa huomioon käyttäjätunnusten voimassaoloaikaa määritettäessä:

    Tietoturva: Käyttäjätunnusten voimassaoloajan rajoittaminen voi auttaa vähentämään riskejä, kuten tunnusten väärinkäyttöä tai luvatonta pääsyä, jos käyttäjän tiedot vuotavat.

    Tietosuoja: Yritykset saattavat haluta rajoittaa käyttäjätunnusten voimassaoloaikaa varmistaakseen, että vain nykyiset työntekijät tai jäsenet pääsevät tiettyihin resursseihin.

    Käyttäjähallinta: Voimassaoloaika voi auttaa pitämään käyttäjäluettelon ajan tasalla, poistamalla automaattisesti käyttäjät, jotka eivät enää tarvitse pääsyä yrityksen järjestelmiin.

    0 comments No comments