> For the complete documentation index, see [llms.txt](https://learning.contextqa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learning.contextqa.com/enterprise-application-testing/ship/auth-profiles.md).

# Reusable Sign-In with Auth Profiles

Configure reusable application authentication for tests and crawls, verify session health, handle sign-in renewal, and troubleshoot dependent execution.

> **Documentation owner:** [Deep Barot](https://contextqa.com/academy/) · **Last updated:** November 11, 2026

## Quick answer

An auth profile represents an application identity and its captured sign-in session for tests and crawls. Configure it in **Environment & Data → Auth Profiles**, run login, verify the session, and reference it from the tests that need that identity. Session reuse reduces repeated setup; it does not remove application permissions, expiration, or interactive authentication requirements.

## Key takeaways

* Use explicit application identities and roles for tests and crawls.
* Verify session health and renewal capability separately.
* Inspect dependencies before changing a shared profile.

## Why use an auth profile?

Use separate profiles for distinct roles such as buyer, approver, and administrator. This makes the test identity explicit and helps prevent a successful admin run from being mistaken for proof that a restricted user can complete the same journey.

The profile retains the current session and the login workflow used to renew it. Session status and renewal capability are separate: a valid session may still require a person when it expires.

## Set up and verify a profile

1. Open **Environment & Data** and select **Auth Profiles**. Older settings links may redirect to this location.
2. Select **Add auth profile** and give it a meaningful application and role name.
3. Configure the application and sign-in details through the protected fields provided by the interface.
4. Select **Run login** and follow the live run. Complete any required interactive authentication through the approved process.
5. Check that the profile reports a verified sign-in and a valid current session.
6. Review the expiration and whether the session can renew itself or needs another assisted sign-in.
7. Use the profile in a small test and verify both authentication and the expected role-specific page or action.

Do not put passwords, OTP values, tokenized URLs, cookies, or session snapshots in test descriptions, documents, screenshots, or coding-agent handoffs.

## Use the profile in a test

The available auth steps support restoring a profile, verifying sign-in, branching when not signed in, signing in again, and saving the resulting session. Choose the sequence that matches your application instead of assuming restoration always succeeds.

```
Restore the intended application auth profile
Verify that the user is signed in with the expected role
If not signed in, follow the approved renewal flow
Verify sign-in again before starting the business journey
Execute the journey and assert the business outcome
```

Keep shared authentication in a prerequisite when several tests need the same setup. Use **Where used** to inspect dependent cases before changing or removing a profile. Revalidate representative dependent tests after a significant login change.

## Understand session state

| State or capability               | Meaning                                                    | Action                                                    |
| --------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- |
| Not signed in yet                 | No verified session has been captured                      | Run login                                                 |
| Signed in / current valid session | A captured session is available                            | Verify the application still accepts it at execution time |
| Session expired                   | The saved session is no longer accepted                    | Capture a new session through login                       |
| Renews itself                     | The login is replayable and can support configured renewal | Check auto re-sign-in policy and validate renewal         |
| Needs a sign-in to renew          | Renewal requires an interactive sign-in                    | Complete the approved interaction before dependent work   |
| Revoked or superseded             | The snapshot should not be reused as the current session   | Inspect the active profile and current snapshot           |

Automatic re-sign-in depends on a replayable login and the configured setting. MFA, passkeys, and identity-provider policies can require human participation; do not weaken those controls to obtain unattended execution.

## Troubleshooting

| Symptom                                                    | What to check                                                                                                |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Many dependent tests fail before the first business action | Session health, application URL, role and prerequisite result                                                |
| Login works but the target page is unavailable             | Role permissions, application state and the intended environment                                             |
| The wrong user's data appears                              | Profile selection and whether shared test data or sessions overlap                                           |
| A crawl cannot reach protected features                    | Verify the profile with a small authenticated journey before recrawling                                      |
| A renewal loop continues                                   | Inspect the sign-in run and identity-provider requirements; resolve the cause before resuming dependent runs |

## Related guides

* [Environment and data management](https://learning.contextqa.com/enterprise-application-testing/web-testing/environment-data-management.md)
* [Ship onboarding](https://learning.contextqa.com/enterprise-application-testing/ship/getting-started.md)
* [SAP prerequisites](https://learning.contextqa.com/packaged-application-testing/sap-testing.md#prepare-the-environment)
* [Release readiness](https://learning.contextqa.com/enterprise-application-testing/ship/release-readiness.md)

## Auth profile setup screen

![Empty auth profile setup form with login method and session renewal controls](https://4255556216-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKlyaXxb76z3Dn47TrZkU%2Fuploads%2Fgit-blob-7858c29a5674d5c02e3196186cf02a76d7938ee5%2Fauth-profile-setup.jpg?alt=media)

Creating a profile and capturing a signed-in session are separate steps. Save the configuration, run login, then verify the session before dependent tests use it. Select the profile associated with the intended environment when configuring a crawl.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learning.contextqa.com/enterprise-application-testing/ship/auth-profiles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
