Files
19f9ac5ba2 [AutoPR @azure-arm-devhub]-generated-from-SDK Generation - JS-6392787 (#38811)
Configurations:
'specification/developerhub/resource-manager/Microsoft.DevHub/DeveloperHub/tspconfig.yaml',
API Version: 2025-03-01-preview, SDK Release Type: beta, and CommitSHA:
'4270ac9d4ba3f3bb031b01f5773208d7d4827a9e' in SpecRepo:
'https://github.com/Azure/azure-rest-api-specs' Pipeline run:
https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6392787
Refer to
https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites
to prepare for SDK release.

---------

Co-authored-by: Jiao Di (MSFT) <[email protected]>
2026-06-08 22:52:10 +08:00

28 lines
925 B
TypeScript

// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { DeveloperHubServiceClient } from "@azure/arm-devhub";
import { DefaultAzureCredential } from "@azure/identity";
/**
* This sample demonstrates how to gets ADOOAuth info used to authenticate users with ADO.
*
* @summary gets ADOOAuth info used to authenticate users with ADO.
* x-ms-original-file: 2025-03-01-preview/ADOOAuthInfo.json
*/
async function adoOAuthInfo(): Promise<void> {
const credential = new DefaultAzureCredential();
const subscriptionId = "00000000-0000-0000-0000-000000000000";
const client = new DeveloperHubServiceClient(credential, subscriptionId);
const result = await client.getAdooAuthInfo("eastus2euap", {
parameters: { redirectUrl: "https://ms.portal.azure.com/aks" },
});
console.log(result);
}
async function main(): Promise<void> {
await adoOAuthInfo();
}
main().catch(console.error);