, , 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. .