Others

Can Microsoft 365 Create DNS A Records Programmatically?

Camila MilosovichCamila Milosovich Nov 27, 2026 868 views

Question details

The user wants to create or update a domain's DNS A record programmatically when a server's IP address changes.

Can Microsoft 365 Create DNS A Records Programmatically?
Product
Microsoft 365 domain and DNS management
Device & OS
not provided
Scenario
A domain is configured for Microsoft 365, and a server's A record needs to be updated when its IP address changes.
Observed behavior
The A record can be updated manually, but Microsoft 365 does not generally provide an API or PowerShell cmdlet for managing arbitrary DNS A records.
Before you start

Identify the authoritative DNS provider for your domain and the hostname and IP address you need to update. If the server must be reachable from the public internet, use its public IP address; addresses in the 10.0.0.0/8 range are private.

Solution 1Recommended

Update the A record manually with your DNS provider

Use this approach when IP changes are infrequent and manual DNS updates are acceptable.

1
Open DNS management

Sign in to the portal of your authoritative DNS provider and open DNS management for your domain. If your Microsoft 365 portal provides DNS editing for the domain, open Settings > Domains and select the domain.

2
Edit the A record

Find the A record for the hostname, select Edit, and replace its address with the new IP address.

3
Save and verify

Select Save, then use a DNS lookup tool such as nslookup to check that the hostname resolves to the new address. Cached results may persist until the record's TTL expires.

Update the A record manually with your DNS provider
Free Microsoft Office alternative

Use WPS Office for Everyday Office Work

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility for an easier transition. DNS A records must still be managed through your DNS provider.

Create and edit documents, spreadsheets, and presentationsOpen and save Microsoft Office formats such as DOCX, XLSX, and PPTXUse spreadsheets to document DNS records and IP changesWork in a familiar, easy-to-use interface
microsoft office alternative - wps office

Frequently Asked Questions

Can Microsoft 365 PowerShell update arbitrary DNS A records?

Microsoft 365 does not generally provide a PowerShell cmdlet for managing arbitrary A records. Use the authoritative DNS provider's PowerShell module or API instead.

Where do I change an A record manually?

Sign in to the authoritative DNS provider's portal, open DNS management for the domain, and edit the A record for the hostname. A Microsoft 365 portal may offer DNS editing for some domain configurations.

Can I use a 10.x.x.x address for a public server's A record?

A 10.x.x.x address is private and is not directly routable on the public internet. For public access, point the A record to the server's public IP address and configure any required network routing.

Why does the old IP address still appear after I update the record?

DNS resolvers may cache the old answer until the record's TTL expires. Use a DNS lookup tool to check the authoritative response and allow time for cached results to refresh.