Skip to content
v2.7

Update project OAuth2 Microsoft

Update the project OAuth2 Microsoft configuration.

PATCH/project/oauth2/microsoftScope project.oauth2.write

SDK: @owbase/node only

Update the project OAuth2 Microsoft configuration.

applicationId string

‘Entra ID Application ID, also known as Client ID’ of Microsoft OAuth2 app. For example: 00001111-aaaa-2222-bbbb-3333cccc4444

applicationSecret string

‘Entra ID Application Secret, also known as Client Secret’ of Microsoft OAuth2 app. For example: A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u

tenant string

Microsoft Entra ID tenant identifier. Use ‘common’, ‘organizations’, ‘consumers’ or a specific tenant ID. For example: common

enabled boolean

OAuth2 sign-in method status. Set to true to enable new session creation. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid.

prompt ProjectOAuth2MicrosoftPrompt[]

Array of Microsoft OAuth2 prompt values. “none” means: don’t display any authentication or consent screens. “login” means: prompt the user to re-authenticate. “consent” means: prompt the user for consent. “select_account” means: prompt the user to select an account. Pass an empty array to use the Microsoft default. Values: none, login, consent, select_account.

Access: API key with the project.oauth2.write scope.

200Success
400Invalid or missing parameter
401No session, no permission on the resource or key without the scope
429Rate limit

Every error comes as JSON with code, type and message: see Errors.

import { Client, Project, ProjectOAuth2MicrosoftPrompt } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const project = new Project(client);
const result = await project.updateOAuth2Microsoft({
applicationId: '<APPLICATION_ID>', // optional
applicationSecret: '<APPLICATION_SECRET>', // optional
tenant: '<TENANT>', // optional
enabled: false, // optional
prompt: [ProjectOAuth2MicrosoftPrompt.None], // optional
});
Response200 OK
{
"$id": "github",
"enabled": false,
"applicationId": "00001111-aaaa-2222-bbbb-3333cccc4444",
"applicationSecret": "A1bC2dE3fH4iJ5kL6mN7oP8qR9sT0u",
"prompt": [
"none"
],
"tenant": "common"
}

The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.

Was this page helpful?