Table 5505368 M365 Authorization Resource

Table 5505368 M365 Authorization Resource

LanguageCaption
de-DEAutorisierung Ressource
es-ESRecurso de autorización
en-USAuthorization Resource
it-ITRisorsa autorizzazione

Fields

Code (10)

Code[20]

LanguageCaption
de-DECode
es-ESCódigo
en-USCode
it-ITCodice

Resource Url (100)

Text[150]

LanguageCaption
de-DERessourcen-URL
es-ESURL del recurso
en-USResource URL
it-ITURL risorsa

Scope (110)

Text[50]

LanguageCaption
de-DEBereich
es-ESÁmbito
en-USScope
it-ITAmbito

Tenant Code (120)

Code[20]

TableRelation: "M365 Authorization Tenant".Code

LanguageCaption
de-DETenantcode
es-ESCódigo de tenant
en-USTenant Code
it-ITCodice tenant

Methods

GetUserName

procedure GetUserName(): Text

Returns the Full Name of the current user. Fallback to User Name or ‘Unknown User’.

Parameters / Return Value

  • Returns Text

    The users Full Name.


GetFullScope

procedure GetFullScope(): Text

Returns the full scope as a combination of the Resource Url and the Scope field.

Parameters / Return Value

  • Returns Text

    A complete Scope Url (Text)


AcquireOAuth2V1AuthorizationToken

procedure AcquireOAuth2V1AuthorizationToken(authorizationClient: Record "M365 Authorization Client";prompt: Enum "Prompt Interaction"; origin: Enum "M365 Authorization Origin"; raiseError: Boolean;var returnAccessToken: Text; var returnErrorText: Text): Boolean

Gets the authorization token based on the authorization code via the OAuth2 v1.0 code grant flow.

Parameters / Return Value

  • authorizationClient Record "M365 Authorization Client"

    An initialized M365 Authorization Client Record instance.

  • prompt Enum "Prompt Interaction"

    Select the interaction prompt used for this OAuth2 2.0 request.

  • origin Enum "M365 Authorization Origin"

    Usually, the function first tries to get a valid token from cache. Set to true to avoid a cached token.

  • raiseError Boolean

    If true, an error is raised if authorization is not successful.

  • returnAccessToken Text

    If successful, the authorization access token is returned here.

  • returnErrorText Text

    In case of an error, this variable contains a failure description.

  • Returns Boolean

    True if authorization succeeded, false otherwise.


AcquireOAuth2V1AuthorizationToken

procedure AcquireOAuth2V1AuthorizationToken(authorizationClient: Record "M365 Authorization Client";prompt: Enum "Prompt Interaction"; origin: Enum "M365 Authorization Origin"; raiseError: Boolean;var returnAccessToken: SecretText; var returnErrorText: Text): Boolean

Gets the authorization token based on the authorization code via the OAuth2 v1.0 code grant flow.

Parameters / Return Value

  • authorizationClient Record "M365 Authorization Client"

    An initialized M365 Authorization Client Record instance.

  • prompt Enum "Prompt Interaction"

    Select the interaction prompt used for this OAuth2 2.0 request.

  • origin Enum "M365 Authorization Origin"

    Usually, the function first tries to get a valid token from cache. Set to true to avoid a cached token.

  • raiseError Boolean

    If true, an error is raised if authorization is not successful.

  • returnAccessToken SecretText

    If successful, the authorization access token is returned here.

  • returnErrorText Text

    In case of an error, this variable contains a failure description.

  • Returns Boolean

    True if authorization succeeded, false otherwise.


AcquireOAuth2V2AuthorizationToken

procedure AcquireOAuth2V2AuthorizationToken(authorizationClient: Record "M365 Authorization Client";prompt: Enum "Prompt Interaction"; origin: Enum "M365 Authorization Origin";raiseError: Boolean;var returnAccessToken: Text; var returnErrorText: Text): Boolean

Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.

Parameters / Return Value

  • authorizationClient Record "M365 Authorization Client"

    An initialized M365 Authorization Client Record instance.

  • prompt Enum "Prompt Interaction"

    Select the interaction prompt used for this OAuth2 2.0 request.

  • origin Enum "M365 Authorization Origin"

    Usually, the function first tries to get a valid token from cache. Set to true to avoid a cached token.

  • raiseError Boolean

    If true, an error is raised if authorization is not successful.

  • returnAccessToken Text

    If successful, the authorization access token is returned here.

  • returnErrorText Text

    In case of an error, this variable contains a failure description.

  • Returns Boolean

    True if authorization succeeded, false otherwise.


AcquireOAuth2V2AuthorizationToken

procedure AcquireOAuth2V2AuthorizationToken(authorizationClient: Record "M365 Authorization Client";prompt: Enum "Prompt Interaction"; origin: Enum "M365 Authorization Origin";raiseError: Boolean;var returnAccessToken: SecretText; var returnErrorText: Text): Boolean

Gets the authorization token based on the authorization code via the OAuth2 v2.0 code grant flow.

Parameters / Return Value

  • authorizationClient Record "M365 Authorization Client"

    An initialized M365 Authorization Client Record instance.

  • prompt Enum "Prompt Interaction"

    Select the interaction prompt used for this OAuth2 2.0 request.

  • origin Enum "M365 Authorization Origin"

    Usually, the function first tries to get a valid token from cache. Set to true to avoid a cached token.

  • raiseError Boolean

    If true, an error is raised if authorization is not successful.

  • returnAccessToken SecretText

    If successful, the authorization access token is returned here.

  • returnErrorText Text

    In case of an error, this variable contains a failure description.

  • Returns Boolean

    True if authorization succeeded, false otherwise.


TestAcquireOAuth2V1AuthorizationToken

procedure TestAcquireOAuth2V1AuthorizationToken(authorizationClient: Record "M365 Authorization Client"; raiseMessage: Boolean): Boolean

Test if acquiring an authorization token based on the authorization code via the OAuth2 v1.0 code grant flow works.

Parameters / Return Value

  • authorizationClient Record "M365 Authorization Client"

    An initialized M365 Authorization Client Record instance.

  • raiseMessage Boolean

    If true, an error is raised if authorization is not successful.

  • Returns Boolean

    True if the test succeeded, false otherwise.


TestAcquireOAuth2V1AuthorizationToken

procedure TestAcquireOAuth2V1AuthorizationToken(raiseMessage: Boolean): Boolean

Test if acquiring an authorization token based on the authorization code via the OAuth2 v1.0 code grant flow works. If more than 1 M365 Authorization Client record exists, opens a selection page.

Parameters / Return Value

  • raiseMessage Boolean

    If true, an error is raised if authorization is not successful.

  • Returns Boolean

    True if the test succeeded, false otherwise.


TestAcquireOAuth2V2AuthorizationToken

procedure TestAcquireOAuth2V2AuthorizationToken(authorizationClient: Record "M365 Authorization Client"; raiseMessage: Boolean): Boolean

Test if acquiring an authorization token based on the authorization code via the OAuth2 v2.0 code grant flow works.

Parameters / Return Value

  • authorizationClient Record "M365 Authorization Client"

    An initialized M365 Authorization Client Record instance.

  • raiseMessage Boolean

    If true, an error is raised if authorization is not successful.

  • Returns Boolean

    True if the test succeeded, false otherwise.


TestAcquireOAuth2V2AuthorizationToken

procedure TestAcquireOAuth2V2AuthorizationToken(raiseMessage: Boolean): Boolean

Test if acquiring an authorization token based on the authorization code via the OAuth2 v2.0 code grant flow works. If more than 1 M365 Authorization Client record exists, opens a selection page.

Parameters / Return Value

  • raiseMessage Boolean

    If true, an error is raised if authorization is not successful.

  • Returns Boolean

    True if the test succeeded, false otherwise.



EOS Labs -