79460228

Date: 2025-02-22 20:13:28
Score: 1
Natty:
Report link

Yep I am using this code and it works. Also MS documentation confirms this

const projectClient = await SDK.getService<IProjectPageService>(CommonServiceIds.ProjectPageService);
const projectContext = await projectClient.getProject();
const hostContext = SDK.getHost();

let organizationId = hostContext.id
let organizationName = hostContext.name
let projectName = projectContext.Name

let url = `https://dev.azure.com/${organizationName}/${projectName}/<whatever you need>`

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: fededim