Configure OAuth 2.0 for Azure


You must configure your app’s Azure OAuth 2.0 secrets in the following cases:

Before you proceed, register your new app in Azure and configure it for OAuth 2.0, as described in Configure an OAuth 2.0 client in Azure.

Obtain the OAuth 2.0 secrets from Azure

  1. Sign in to the Azure portal (https://azure.microsoft.com) and navigate to “App Registrations”.

    App Registrations page

  2. Click the application. The Overview page opens.

  3. In the Overview page, take note of the following secrets: Application ID, Directory (tenant) ID, Client secret, Redirect URI. You will need these in a subsequent step.

    App Overview page

Configure the Azure OAuth 2.0 Client in SBS

To configure the Azure OAuth 2.0 client in SBS:

  1. Sign in to the SBS Console.
  2. In the left-hand side navigation menu, click Applications.
  3. Select your application, and then click the OAuth2 tab.
  4. Click the Azure Client tab.
  5. Click Edit. A dialog box opens.
  6. Enter your Azure client secrets as obtained from Azure platform, and then click Save.

SBS Console Update Azure Client

GraphQL

To configure the Amazon Cognito OAuth 2.0 client from GraphQL:

  1. Obtain your OAuth 2.0 client secrets from the Azure platform, as described above.
  2. Run the updateApp mutation of the Account API and provide the previously obtained authorization details as parameters to AzureClientSecret.
mutation updateAppAzure($id: ID!, $input: UpdateAppInput!) {
  updateApp(id: $id, input: $input) {
    azureClientSecret{
      web {
        application_id
      }
    }
  }
}

Make sure to replace variables with the values mentioned in step 3 above.

{
  "id":"YOUR_SBS_APP_ID",
  "input": {
    "azureClientSecret": {
      "web": {
        "tenant_id": "YOUR_AZURE_TENANT_ID",
        "application_id": "YOUR_AZURE_APPLICATION_ID",
        "client_secret": "YOUR_AZURE_CLIENT_SECRET",
        "redirect_uri": "YOUR_AZURE_REDIRECT_URI"
      }
    }
  }
}