--- title: "Edit OAuth 2" slug: "edit-an-oauth-2" tags: ["Site Administrator", "How-to"] updated: 2026-08-13T16:01:14Z published: 2026-08-13T16:01:14Z canonical: "totara.help/edit-an-oauth-2" --- > ## Documentation Index > Fetch the complete documentation index at: https://totara.help/llms.txt > Use this file to discover all available pages before exploring further. # Edit OAuth 2 After an [OAuth 2 service has been set up](/totara-20/docs/configure-oauth2), you can edit it to make changes as required. ## Editing the settings 1. Go to *Quick-access menu >* *Server > OAuth 2* *services*. 2. Click the cog icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/cog.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)) in the **Edit** column. 3. Make your changes to the settings. 4. Click **Save changes**. ## Configure endpoints 1. Go to *Quick-access menu >* *Server > OAuth 2* *services*. 2. Click the list icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/list.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)) in the **Edit** column. 3. Click the cog icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/cog.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)) to edit the endpoint **Name** or **URL**. 4. Click **Save changes**. You can also delete an endpoint by clicking the cross icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/thin_cross.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)), or add a new endpoint by clicking **Create new endpoint for issuer "[issuer name]"**. The issuer's endpoints are the URLs which Totara connects to. There are three endpoints required for user authentication: - authorization_endpoint - token_endpoint - userinfo_endpoint For Google, Microsoft, Facebook, and Nextcloud services you will not need to configure these endpoints, as these will be URLs for the OAuth provider. For example, an endpoint for Google would be **https://accounts.google.com/o/oauth2/v2/auth**. For custom services you will need to add the endpoints. ## Configure user field mappings You can edit, delete, or create mappings between user data fields on the issue site and your Totara site to ensure the correct information is brought across. To configure user field mappings, follow these steps: 1. Go to *Quick-access menu >* *Server > OAuth 2* *services*. 2. Click the person icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/person.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)) in the **Edit** column. 3. Click the cog icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/cog.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)) to edit the **External field name** and **Internal field name** fields. 4. Click **Save changes**. You can also delete a user field with the cross icon (![](https://cdn.document360.io/a007399b-031e-436b-999a-528240e16f58/Images/Documentation/thin_cross.png?sv=2026-02-06&spr=https&st=2026-11-01T13%3A40%3A45Z&se=2026-11-01T14%3A40%3A45Z&sr=c&sp=r&sig=hXH%2BhvjpkTarFjkIslQ19xX1YJWb95psoD4koxFc4mU%3D)), or add a new user field mapping by clicking **Create new user field mapping for issuer "[issuer name]"**. When configuring field mappings, the **External field name** uses the hyphen character (**-**) as a separator for nested object fields. For example, the name **country-region** will look up the **region** field of a **country** object in the response data from an OAuth 2 **userinfo** request. If your **userinfo** data contains any hyphens in the field names then you will need to escape them using a backslash character (**\**) in the **External field name** field in Totara. For example, if you set the **External field name** to **country-region** Totara will try to find the field **country-region** in the **userinfo** response data. Therefore you should set the **External field name** to **country\-region** to ensure that the field name is interpreted correctly. When configuring OAuth 2 with Microsoft Azure AD, only certain fields will be available to map by default. If you want Microsoft to provide additional fields, you will need to configure Totara to request them by editing the **userinfo_endpoint** URL of the Microsoft API connection. For example, if you wanted to map the **department** field in addition to the default fields, you would change the URL from: **https://graph.microsoft.com/v1.0/me** to **https://graph.microsoft.com/v1.0/me?$select=businessPhones,displayName,givenName,id,jobTitle,mail,mobilePhone,officeLocation,preferredLanguage,surname,userPrincipalName,department** Note that if you are adding fields in this way, you also need to list all of the default fields in the URL. You can use Microsoft's [Graph Explorer tool](https://developer.microsoft.com/en-us/graph/graph-explorer) to confirm what data is available (i.e. the exact field names) and amend the URL accordingly. Join the [Totara Community](https://totara.community/) for more resources to help you get the most out of Totara. © Copyright 2026 Totara Learning Solutions. All rights reserved.