azure_ad_login/create_azure_client_secret.py
def store_az_client_secret(*, app_id, env, password):
    """
    Stores a new client secret with an Azure application.
    """
    az(
        "ad",
        "app",
        "credential",
        "reset",
        # --append = append a new credential rather than overwriting the
        # existing credentials.
        "--append",
        # application ID
        "--id",
        app_id,
        # Expires one year after it's created
        "--end-date",
        (dt.date.today() + dt.timedelta(days=365)).isoformat(),
        # Unfortunately, this description can only be a handful of characters
        # long, and the error message is quite confusing.
        # See https://github.com/Azure/azure-cli/issues/10720
        "--credential-description",
        f"weco/{env}",
        # The password
        "--password",
        password,
    )

    Stores a new client secret with an Azure application.
    
Stores a new client secret with an Azure application.
Stores a new client secret with an Azure application .
def store_az_client_secret(*, app_id, env, password):
    az(
        "ad",
        "app",
        "credential",
        "reset",
        "--append",
        "--id",
        app_id,
        "--end-date",
        (dt.date.today() + dt.timedelta(days=365)).isoformat(),
        "--credential-description",
        f"weco/{env}",
        "--password",
        password,
    )
def store_az_client_secret ( * , app_id , env , password ) : az ( "ad" , "app" , "credential" , "reset" , "--append" , "--id" , app_id , "--end-date" , ( dt . date . today ( ) + dt . timedelta ( days = 365 ) ) . isoformat ( ) , "--credential-description" , f"weco/{env}" , "--password" , password , )
Stores a new client secret with an Azure application.
Stores a new client secret with an Azure application .
"""
    Stores a new client secret with an Azure application.
    """ # --append = append a new credential rather than overwriting the # existing credentials. # application ID # Expires one year after it's created # Unfortunately, this description can only be a handful of characters # long, and the error message is quite confusing. # See https://github.com/Azure/azure-cli/issues/10720 # The password
app_id
env
password