Azure Active Directory Application Key Update

When you configure the application in Azure Active Directory, you can create keys that are valid for 1 or 2 years. In an organization with many services and clients, how do you manage key updates?

Does Azure Active Directory tell you when a key is about to expire? Is there a way to generate a key with a longer life or even an indefinite life?

Active Directory Key Duration for Azure

+4
source share
3 answers

, , / Azure Active Directory (AAD), Azure .

, Azure, 2 , .. 1 2 .

enter image description here

, !

+1

, , 99 , . AppId.

;

var app = (Application)await GraphAPI.NativeConnection.Applications.Where(a => a.AppId.Equals(appClientId)).ExecuteSingleAsync();
string clientSecert = Guid.NewGuid().ToString();
DateTime exipre = DateTime.UtcNow.AddYears(99);
PasswordCredential pwc = new PasswordCredential
{
    StartDate = DateTime.UtcNow,
    EndDate = exipre,
    KeyId = Guid.NewGuid(),
    Value = clientSecert
};

app.PasswordCredentials.Add(pwc);
await app.UpdateAsync();

return new AppData { ClientId = appClientId, ClientSecert = clientSecert, ExpireDate = exipre };

GraphAPI.NativeConnection - API- azure.

, -

- , .

ResourceAccess. .

+1

Source: https://habr.com/ru/post/1621267/


All Articles