---
title: "Codeunit 30199 Shpfy Authentication Mgt., extension points 29"
author: "JOP-AL"
url: https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/points/
object: https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/
app: "Shopify Connector"
major: 29
source: https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/
checked: 2026-11-20
changed: 2026-10-05
subject: "Microsoft Dynamics 365 Business Central"
license: "Metadata from Microsoft's symbol packages. AL source MIT, Copyright (c) Microsoft Corporation. Selection and wording © 2026 JOP-AL. https://jonas-paprotka.de/licenses/"
---

# Codeunit 30199 Shpfy Authentication Mgt., extension points 29

JOP-AL, https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/points/

22 procedures and triggers with a step in src/Apps/W1/Shopify/App/src/Integration/Codeunits/ShpfyAuthenticationMgt.Codeunit.al, in source order, read from the text, not from a run.

## GetClientId

[Line 51](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L51), local.

- [57](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L57) calls [Codeunit 457 Environment Information](https://jonas-paprotka.de/ref/codeunit/457-environment-information/) `IsSaaS`
- [60](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L60) calls [Codeunit 2200 Azure Key Vault](https://jonas-paprotka.de/ref/codeunit/2200-azure-key-vault/) `GetAzureKeyVaultSecret`

## GetClientSecret

[Line 67](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L67), local.

- [73](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L73) calls [Codeunit 457 Environment Information](https://jonas-paprotka.de/ref/codeunit/457-environment-information/) `IsSaaS`
- [76](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L76) calls [Codeunit 2200 Azure Key Vault](https://jonas-paprotka.de/ref/codeunit/2200-azure-key-vault/) `GetAzureKeyVaultSecret`

## InstallShopifyApp

[Line 83](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L83), internal.

- [99](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L99) calls [Codeunit 501 OAuth2](https://jonas-paprotka.de/ref/codeunit/501-oauth2/) `GetDefaultRedirectURL`
- [101](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L101) calls `GetScope`
- [102](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L102) calls `GetClientId`
- [103](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L103) calls [Page 30135 Shpfy Authentication](https://jonas-paprotka.de/ref/page/30135-shpfy-authentication/) `SetOAuth2Properties`
- [106](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L106) calls [Page 30135 Shpfy Authentication](https://jonas-paprotka.de/ref/page/30135-shpfy-authentication/) `Store`
- [110](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L110) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `SetStoreName`
- [114](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L114) calls [Page 30135 Shpfy Authentication](https://jonas-paprotka.de/ref/page/30135-shpfy-authentication/) `GetAuthorizationCode`
- [116](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L116) calls [Page 30135 Shpfy Authentication](https://jonas-paprotka.de/ref/page/30135-shpfy-authentication/) `GetAuthError`
- [117](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L117) calls [Page 30135 Shpfy Authentication](https://jonas-paprotka.de/ref/page/30135-shpfy-authentication/) `GetAuthError`
- [120](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L120) calls [Page 30135 Shpfy Authentication](https://jonas-paprotka.de/ref/page/30135-shpfy-authentication/) `State`
- [122](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L122) calls `GetToken`

## GetToken

[Line 126](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L126), local.

- [133](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L133) calls `GetClientId`
- [137](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L137) calls `GetClientSecret`
- [140](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L140) calls `ExecuteTokenRequest`
- [141](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L141) calls `IsSuccessStatusCode`
- [143](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L143) calls `ResponseHasAccessToken`
- [146](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L146) calls `SaveInstalledToken`

## SaveInstalledToken

[Line 187](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L187), local.

- [195](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L195) writes [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) Insert
- [197](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L197) calls `GetScope`
- [198](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L198) writes [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) Modify
- [199](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L199) calls `SaveTokenResponse`

## SaveTokenResponse

[Line 203](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L203), local.

- [242](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L242) calls `AddSeconds`
- [252](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L252) calls `AddSeconds`
- [256](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L256) writes [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) Modify
- [258](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L258) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `SetAccessToken`
- [267](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L267) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `SetRefreshToken`

## EnsureValidAccessToken

[Line 278](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L278), internal.

- [286](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L286) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `HasRefreshToken`
- [287](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L287) calls `TokenNeedsRefresh`
- [290](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L290) calls `ShouldAttemptMigration`
- [297](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L297) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `HasRefreshToken`
- [298](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L298) calls `TokenNeedsRefresh`
- [299](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L299) calls `RefreshAccessToken`
- [301](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L301) calls `TryMigrate`

## ForceTokenRefresh

[Line 311](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L311), internal.

- [319](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L319) calls `ShouldForceRefresh`
- [325](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L325) calls `ShouldForceRefresh`
- [329](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L329) writes [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) Modify
- [333](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L333) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `HasRefreshToken`
- [334](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L334) calls `RefreshAccessToken`
- [336](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L336) calls `TryMigrate`

## ShouldForceRefresh

[Line 342](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L342), local.

- [346](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L346) calls `GetForceRefreshCooldown`

## TryMigrate

[Line 354](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L354), local.

- [358](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L358) calls `ShouldAttemptMigration`
- [361](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L361) writes [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) Modify
- [362](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L362) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `GetAccessToken`
- [363](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L363) calls `MigrateToExpiringToken`

## ShouldAttemptMigration

[Line 366](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L366), local.

- [370](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L370) calls `GetMigrationCooldown`

## MigrateToExpiringToken

[Line 379](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L379), local.

- [386](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L386) calls `GetClientId`
- [393](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L393) calls `GetClientSecret`
- [394](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L394) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `GetAccessToken`
- [396](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L396) calls `ExecuteTokenRequest`
- [400](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L400) calls `IsSuccessStatusCode`
- [400](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L400) calls `ResponseHasAccessToken`
- [401](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L401) calls `SaveTokenResponse`

## RefreshAccessToken

[Line 408](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L408), local.

- [416](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L416) calls `RefreshTokenExpired`
- [418](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L418) calls `CreateReconnectErrorInfo`
- [424](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L424) calls `GetClientId`
- [428](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L428) calls `GetClientSecret`
- [430](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L430) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `GetRefreshToken`
- [432](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L432) calls `ExecuteTokenRequest`
- [434](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L434) calls `IsSuccessStatusCode`
- [434](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L434) calls `ResponseHasAccessToken`
- [435](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L435) calls `SaveTokenResponse`
- [443](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L443) calls `CreateReconnectErrorInfo`
- [452](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L452) calls `TokenExpired`

## TokenNeedsRefresh

[Line 457](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L457), local.

- [462](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L462) calls `GetRefreshBufferMs`

## AccessTokenExist

[Line 511](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L511), internal.

- [516](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L516) calls `GetScope`
- [517](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L517) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `GetAccessToken`

## IsRefreshTokenExpired

[Line 525](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L525), internal.

- [532](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L532) calls [Table 30138 Shpfy Registered Store New](https://jonas-paprotka.de/ref/table/30138-shpfy-registered-store-new/) `HasRefreshToken`
- [534](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L534) calls `RefreshTokenExpired`

## ReconnectFromNotification

[Line 537](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L537), internal.

- [544](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L544) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `RequestAccessToken`
- [545](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L545) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `GetShopSettings`
- [546](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L546) writes [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) Modify

## ReconnectFromError

[Line 562](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L562), internal.

- [573](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L573) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `GetStoreName`
- [574](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L574) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `RequestAccessToken`
- [575](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L575) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `GetShopSettings`
- [576](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L576) writes [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) Modify

## AssertValidShopUrl

[Line 582](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L582), internal.

- [587](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L587) calls [Codeunit 3060 Uri](https://jonas-paprotka.de/ref/codeunit/3060-uri/) `IsValidURIPattern`

## IsValidHostName

[Line 591](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L591).

- [596](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L596) calls [Codeunit 3060 Uri](https://jonas-paprotka.de/ref/codeunit/3060-uri/) `IsValidURIPattern`

## EnableHttpRequestForShopifyConnector

[Line 610](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L610), internal.

- [616](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L616) calls [Codeunit 2504 Extension Management](https://jonas-paprotka.de/ref/codeunit/2504-extension-management/) `ConfigureExtensionHttpClientRequestsAllowance`

## CheckScopeChange

[Line 619](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L619), internal.

- [626](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L626) calls [Table 30102 Shpfy Shop](https://jonas-paprotka.de/ref/table/30102-shpfy-shop/) `GetStoreName`
- [630](https://jonas-paprotka.de/ref/codeunit/30199-shpfy-authentication-mgt/source/#L630) calls `GetScope`

## Source

AL source 29: https://github.com/microsoft/BCApps, MIT, releases/29.x at 4303e5e584d3aa5d9e98cbc615525a5396ad6ed7.

JOP-AL, 2026-11-20.
