Skip to main content
Skip table of contents

Device name restrictions for delivery methods

Device name restrictions is available in preview for AppsAnywhere 3.2, and must be enabled by AppsAnywhere support.

If you are interested in trying out this feature then please contact your customer success manager or open a ticket with AppsAnywhere Support.

Device name restrictions allow delivery methods to be restricted to specific devices by name using regular expression matching. This is useful when application access is controlled via SAML, including AppsAnywhere Cloud.

How it works

The Allowed device name field allows you to list different regex patterns (one per line) that will be matched against the name of the device. If the device name does not match any of the allowed patterns the delivery method will be shown as unavailable. If the field is empty, all device names will be allowed.

The Excluded device name is used in the same way as the Allowed device name field, however if a device matches any of the patterns listed, the delivery method will be shown as unavailable. This is true even if the device matches any of the Allowed patterns.

If both of the fields are empty, device names will not be checked.

Device name sources

These patterns are expected to be case-insensitive.

Windows device names are sourced from the NetBIOS name which tend to be used in uppercase, to avoid confusion, a device with NetBIOS name DESKTOP-EXAMPLE will match the pattern ^desktop-example$.

macOS devices simply match against the name of the device e.g. My MacBook.

Example scenarios

Delivery methods being unavailable:

  1. Device matches an allowed pattern and an excluded pattern

  2. Device does not match an allowed pattern

  3. No allowed patterns are specified, device matches against an excluded pattern

Delivery methods being available:

  1. Device matches an allowed pattern and no excluded patterns

  2. No allowed patterns are specified, device does not match an excluded pattern

  3. No allowed or excluded patterns are specified

Writing regular expressions (Regex)

Regular expressions (regex for short) range from very simple exact or wildcard matches to complex and intricate. You may be a regex wizard, but if not then we would recommend that you keep things as simple as possible.

We support Perl-Compatible Regular Expressions (PCRE). Note that PCRE2 regular expressions are not currently supported.

Top Tip

We would recommend using regex101.com or a similar tool to help build and test your regular expressions.

Regex examples

Scenario

Regex

Result

Allow only devices with names that start with Building1-Lab1-

Allowed device name: ^Building1-Lab1-.+$ (See on regex101.com)

Allowed

  • Building1-Lab1-DeviceABC1

  • Building1-Lab1-DeviceABC2

  • Building1-Lab1-DeviceXYZ1

Not allowed:

  • Building1-Lab2-DeviceABC1

  • Building2-Lab1-DeviceABC1

  • Building2-Lab2-DeviceABC1

Allow only devices with names that start with Building1-Lab1-

and

do not contain DeviceXYZ in the device name

Allowed device name: ^Building1-Lab1-.+$ (See on regex101.com)

Excluded device name: DeviceXYZ.+$ (See on regex101.com)

Allowed

  • Building1-Lab1-DeviceABC1

  • Building1-Lab1-DeviceABC2

Not allowed:

  • Building1-Lab1-DeviceXYZ1

  • Building1-Lab2-DeviceABC1

  • Building2-Lab1-DeviceABC1

  • Building2-Lab2-DeviceABC1

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.