---
title: "changePasswordWithoutUserInteraction(for:existingCredential:newPassword:userInfo:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/asaccountauthenticationmodificationviewcontroller/changepasswordwithoutuserinteraction(for:existingcredential:newpassword:userinfo:)"
---

# changePasswordWithoutUserInteraction(for:existingCredential:newPassword:userInfo:)

Upgrades a user’s weak password to a strong password.

## Declaration

```swift
func changePasswordWithoutUserInteraction(for serviceIdentifier: ASCredentialServiceIdentifier, existingCredential: ASPasswordCredential, newPassword: String, userInfo: [AnyHashable : Any]? = nil)
```

## Parameters

- `serviceIdentifier`: An identifier that represents a particular service that the user needs a credential for, like a web site.
- `existingCredential`: The current password credential for the service.
- `newPassword`: A new, automatically generated, strong password for the service to use.
- `userInfo`: A dictionary that contains app-specific values when the request to upgrade to Sign in with Apple initiates from the parent app. If the request to upgrade to Sign in with Apple doesn’t initiate from the app, this parameter is nil.

## Mentioned in

Upgrading Account Security With an Account Authentication Modification Extension

## Discussion

Discussion If the extension’s Info.plist file includes the ASAccountAuthenticationModificationPasswordGenerationRequirements key, the value of newPassword satisfies the specified requirements.

## See Also

### Upgrading to Strong Passwords

- [prepareInterfaceToChangePassword(for:existingCredential:newPassword:userInfo:)](authenticationservices/asaccountauthenticationmodificationviewcontroller/prepareinterfacetochangepassword(for:existingcredential:newpassword:userinfo:).md)
- [ASAccountAuthenticationModificationSupportsStrongPasswordChange](bundleresources/information-property-list/nsextension/asaccountauthenticationmodificationsupportsstrongpasswordchange.md)
- [ASAccountAuthenticationModificationPasswordGenerationRequirements](bundleresources/information-property-list/nsextension/asaccountauthenticationmodificationpasswordgenerationrequirements.md)
- [ASAccountAuthenticationModificationOptOutOfSecurityPromptsOnSignIn](bundleresources/information-property-list/asaccountauthenticationmodificationoptoutofsecuritypromptsonsignin.md)
