public CreateAppPasswordCredential ( string appObjectId, Microsoft.Azure.Graph.RBAC.Models.PasswordCredential credential ) : |
||
appObjectId | string | |
credential | Microsoft.Azure.Graph.RBAC.Models.PasswordCredential | |
return |
public PSADCredential CreateAppPasswordCredential(string appObjectId, PasswordCredential credential)
{
ValidatePasswordCredential(credential);
var passwordCredsList = GetAppPasswordCredentials(appObjectId);
// Add new PasswordCredential to existing KeyCredential list
passwordCredsList.Add(credential);
PatchAppPasswordCredentials(appObjectId, passwordCredsList);
return credential.ToPSADCredential();
}