PHPackages                             a1rpun/microsoft-links-refresh - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. a1rpun/microsoft-links-refresh

AbandonedArchivedPackage[Utility &amp; Helpers](/categories/utility)

a1rpun/microsoft-links-refresh
==============================

Fixes redirects to login pages when a user clicks a link to your site from a Microsoft application like Word or Excel

06PHP

Since Jul 23Pushed 6y agoCompare

[ Source](https://github.com/A1rPun/microsoft-links-refresh)[ Packagist](https://packagist.org/packages/a1rpun/microsoft-links-refresh)[ RSS](/packages/a1rpun-microsoft-links-refresh/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

♻️ microsoft-links-refresh
==========================

[](#recycle-microsoft-links-refresh)

*Fixes redirects to login pages when a user clicks a link to your site from a Microsoft application*

- Excel
- Word
- PowerPoint

Code based on this [ruby gem](https://github.com/spilliton/fix_microsoft_links)

### Explanations

[](#explanations)

- [The cause (support.microsoft)](https://support.microsoft.com/en-us/help/899927/you-are-redirected-to-a-logon-page-or-an-error-page-or-you-are-prompte)
- [The actual cause (Stack Overflow)](https://stackoverflow.com/a/2736814/1449624)
- [The workaround for clients (docs.microsoft)](https://docs.microsoft.com/en-us/office/troubleshoot/error-messages/cannot-locate-server-when-click-hyperlink)
- The workaround for server (this package 😉)

📦 Install
---------

[](#package-install)

```
$ composer require a1rpun/microsoft-links-refresh
```

🔧 Config
--------

[](#wrench-config)

**config/services.yaml**

```
microsoft_links_refresh:
  class: A1rPun\MicrosoftLinksRefresh
  tags:
    - { name: kernel.event_subscriber }
```

💪 Example usage
---------------

[](#muscle-example-usage)

**1. Example request object**

```
{
  "headers": {
    "User-Agent": "Excel"
  }
}
```

**2. Response payload (prettified)**

```

```

**3. What happens next?**

The request was discarded initially, now the browser refreshes the page and sends the correct headers like a normal click would do.

### Limitations

[](#limitations)

🐌 As you can see this service slows down page load but gives the user the experience they deserve! [![Response statistic](./assets/request_example.png)](./assets/request_example.png)

❗ The `User-Agent` can be spoofed in the browser by your local user-agent-switcher extension or any request application like `curl` or postman.

⁉️ Currently uses RegEx to parse the User-Agent, may be vulnarable to a [ReDos](https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS) by malicious users.

📃 License
---------

[](#page_with_curl-license)

MIT, see LICENSE.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/75897a2cafb10d643acc8b4ff1a00d97a8eaabd919ffde2ff29b2662020bc552?d=identicon)[A1rPun](/maintainers/A1rPun)

---

Top Contributors

[![A1rPun](https://avatars.githubusercontent.com/u/3754692?v=4)](https://github.com/A1rPun "A1rPun (4 commits)")

### Embed Badge

![Health badge](/badges/a1rpun-microsoft-links-refresh/health.svg)

```
[![Health](https://phpackages.com/badges/a1rpun-microsoft-links-refresh/health.svg)](https://phpackages.com/packages/a1rpun-microsoft-links-refresh)
```

###  Alternatives

[kaufmanndigital/gdpr-cookieconsent

A ready-to-run package, that integrates an advanced cookie consent banner into your Neos CMS site.

2540.7k](/packages/kaufmanndigital-gdpr-cookieconsent)[selective/transformer

A strictly typed array transformer with dot-access, fluent interface and filters.

3817.8k1](/packages/selective-transformer)[derhansen/sf_banners

Banner-Management Extension based on Extbase and Fluid. Loads banners asynchronously using JavaScript.

1144.5k](/packages/derhansen-sf-banners)[martin/wn-forms-plugin

Create easy (and almost magic) AJAX forms

212.3k](/packages/martin-wn-forms-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
