---
id: object/codeunit/3060
type: object
title: Codeunit 3060 "Uri"
summary: Codeunit 3060 "Uri" in System Application (System.Utilities). 20 public procedures. Present since at least BC23, still in BC30, changed in BC28, BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: "30"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: c06abf23a4438e945e383b8f7989c830709b4595b7f7edb7fc746aba4864279b
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/URI/src/Uri.Codeunit.al
    title: src/System Application/App/URI/src/Uri.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/11171
object_type: codeunit
object_id: 3060
name: Uri
namespace: System.Utilities
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
  - "30"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 20
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 30
  implements: 0
---

# Codeunit 3060 "Uri"

> Codeunit 3060 "Uri" in System Application (System.Utilities). 20 public procedures. Present since at least BC23, still in BC30, changed in BC28, BC30.

System Application · System.Utilities · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/URI/src/Uri.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `Init(UriString: Text)`: Initializes a new instance of the Uri class with the specified URI.
- `GetAbsoluteUri(): Text`: Gets the absolute URI.
- `GetScheme(): Text`: Gets the scheme name for the URI.
- `GetHost(): Text`: Gets the host name of the URI.
- `GetAuthority(): Text`: Gets the authority of the URI.
- `GetPort(): Integer`: Gets the port number of the URI.
- `GetAbsolutePath(): Text`: Gets the absolute path of the URI.
- `GetQuery(): Text`: Gets any query information included in the specified URI.
- `GetFragment(): Text`: Gets the escaped URI fragment.
- `GetSegments(var Segments: List of [Text])`: Gets a list containing the path segments that make up the specified URI.
- `EscapeDataString(TextToEscape: Text): Text`: Converts a string to its escaped representation.
- `UnescapeDataString(TextToUnescape: Text): Text`: Converts a string to its unescaped representation.
- `IsValidUri(UriString: Text)`: Checks if the provded string is a valid URI.
- `IsWellFormedUriString(UriString: Text; UriKind: Enum UriKind): Boolean`: Indicates whether the string is well-formed by attempting to construct a URI with the string and ensures that the string does not require further escaping.
- `IsBaseOf(var UriToTest: Codeunit Uri): Boolean`: Determines whether the current Uri instance is a base of the specified Uri instance.
- `ValidateIntegrationURL(FieldValueURL: Text; HardcodedIntegrationURL: Text): Text`: Validates integration URI host from setup table field is the same as the hardcoded integration URI host, returns the hardcoded integration URI if validation fails.
- `AreURIsHaveSameHost(UriString1: Text; UriString2: Text): Boolean`: Verifies whether two URIs have the same host (e.g., both subdomain.example.com\test1 and subdomain.example.com\test2 have the same host subdomain.example.com).
- `IsValidURIPattern(UriString: Text; Pattern: Text): Boolean`: Verifies whether the URI is in a valid pattern.
- `GetUri(var OutUri: DotNet Uri)`: Gets the underlying .Net Uri variable.
- `SetUri(NewUri: DotNet Uri)`: Sets the underlying .Net Uri variable.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3960 "Regex"](../codeunit/3960.md) (1 call: `IsValidURIPattern → IsMatch`)

## Called by

- [Codeunit 560 "CrossIntercompany Connector"](../codeunit/560.md) (8 calls: `GetHostFromUrl → GetHost`, `GetHostFromUrl → Init`, `GetHostFromUrl → IsValidUri`, …)
- [Codeunit 9121 "SharePoint Graph Uri Builder"](../codeunit/9121.md) (4 calls: `AddOptionalParametersToEndpoint → GetAbsoluteUri`, `AddOptionalParametersToEndpoint → Init`, `EscapeDataString → EscapeDataString`, …)
- [Codeunit 3062 "Uri Builder Impl."](../codeunit/3062.md) (3 calls: `CreateNewQueryString → EscapeDataString`, `EncodeParameterKey → EscapeDataString`, `GetUri → SetUri`)
- [Codeunit 7247 "MDM Http Source Transport"](../codeunit/7247.md) (3 calls: `TryInitUri → Init`, `ValidateSourceHost → GetHost`, `ValidateSourceHost → GetScheme`)
- [Codeunit 9064 "Stor. Serv. Auth. Shared Key"](../codeunit/9064.md) (3 calls: `GetCanonicalizedResource → GetSegments`, `GetCanonicalizedResource → Init`, `GetCanonicalizedResource → UnescapeDataString`)
- [Codeunit 9110 "SharePoint Uri Builder"](../codeunit/9110.md) (3 calls: `EscapeDataString → EscapeDataString`, `GetHost → GetHost`, `GetHost → Init`)
- [Codeunit 9510 "Document Service Management"](../codeunit/9510.md) (3 calls: `GetResourceUrl → GetHost`, `GetResourceUrl → Init`, `MakeChildrenPathUrl → EscapeDataString`)
- [Table extension 4701 "VAT Report Setup Extension"](../tableextension/4701.md) (3 calls: `IsAllowedGroupRepresentativeAPIURL → AreURIsHaveSameHost`, `IsAllowedGroupRepresentativeAPIURL → GetScheme`, `IsAllowedGroupRepresentativeAPIURL → Init`)
- [Codeunit 7802 "Azure Functions OAuth2"](../codeunit/7802.md) (2 calls: `Authenticate → GetAbsoluteUri`, `Authenticate → GetHost`)
- [Codeunit 7803 "Azure Functions Impl"](../codeunit/7803.md) (2 calls: `Send → GetAbsoluteUri`, `Send → GetHost`)
- [Codeunit 7807 "Azure Functions OAuth2 Cert"](../codeunit/7807.md) (2 calls: `Authenticate → GetAbsoluteUri`, `Authenticate → GetHost`)
- [Codeunit 9061 "Stor. Serv. Auth. SAS"](../codeunit/9061.md) (2 calls: `Authorize → GetAbsoluteUri`, `CreateSasUrlString → EscapeDataString`)
- [Codeunit 9170 "Conf./Personalization Mgt."](../codeunit/9170.md) (2 calls: `GetProfileConfigurationUrlForWeb → GetAbsoluteUri`, `GetProfileUrlParameterForEvaluationCompany → EscapeDataString`)
- [Page 4410 "SOA Multi Items Availability"](../page/4410.md) (2 calls: `DecodeAvailabilityFilterValue → UnescapeDataString`, `EncodeAvailabilityFilterValue → EscapeDataString`)
- [Codeunit 2023 "Image Analysis Wrapper V3.2"](../codeunit/2023.md) (1 call: `BuildUri → GetAbsoluteUri`)
- [Codeunit 2515 "AppSource Product Manager"](../codeunit/2515.md) (1 call: `ConstructProductListUri → GetAbsoluteUri`)
- [Codeunit 4359 "Custom Agent Profile Mgt"](../codeunit/4359.md) (1 call: `GetProfileConfigurationUrlForWeb → GetAbsoluteUri`)
- [Codeunit 7106 "O365 Bidirectional Sync"](../codeunit/7106.md) (1 call: `IsApprovedGraphRequestUri → ValidateIntegrationURL`)
- [Codeunit 7801 "Azure Functions Code Auth"](../codeunit/7801.md) (1 call: `Authenticate → GetAbsoluteUri`)
- [Codeunit 8333 "VS Code Integration Impl."](../codeunit/8333.md) (1 call: `GetAbsoluteUri → GetAbsoluteUri`)
- [Codeunit 8351 "MCP Config Implementation"](../codeunit/8351.md) (1 call: `IsTIEEnvironment → AreURIsHaveSameHost`)
- [Codeunit 8955 "AFS Format Helper"](../codeunit/8955.md) (1 call: `AppendToUri → GetAbsoluteUri`)
- [Codeunit 9042 "ABS Operation Payload"](../codeunit/9042.md) (1 call: `SetBlobName → EscapeDataString`)
- [Codeunit 9044 "ABS Format Helper"](../codeunit/9044.md) (1 call: `AppendToUri → EscapeDataString`)
- [Codeunit 9088 "Stor. Serv. Auth. Ready SAS"](../codeunit/9088.md) (1 call: `Authorize → GetAbsoluteUri`)
- [Codeunit 9120 "SharePoint Graph Client Impl."](../codeunit/9120.md) (1 call: `InitializeCommon → IsValidURIPattern`)
- [Codeunit 9123 "SharePoint Graph Req. Helper"](../codeunit/9123.md) (1 call: `IsAllowedUploadUrl → IsValidURIPattern`)
- [Codeunit 9352 "Graph Uri Builder"](../codeunit/9352.md) (1 call: `GetUri → GetAbsoluteUri`)
- [Page 4509 "Email - Outlook API Setup"](../page/4509.md) (1 call: `ValidateUri → IsValidUri`)
- [Table 7121 "Contact Sync User"](../table/7121.md) (1 call: `ValidateApprovedGraphDeltaUrl → ValidateIntegrationURL`)

## Recent changes

- 2026-09-22 [#11171 [Security][Hardening] Validate integration URLs stored in setup tables](../../changes/bcapps/11171.md) (main, BC30, fix)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC28, BC30

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Uri")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
