Table 5505368 M365 Authorization Resource
Table 5505368 M365 Authorization Resource
Language | Caption |
---|---|
de-DE | Autorisierung Ressource |
es-ES | Recurso de autorización |
en-US | Authorization Resource |
it-IT | Risorsa autorizzazione |
Fields
Code (10
)
Code[20]
Language | Caption |
---|---|
de-DE | Code |
es-ES | Código |
en-US | Code |
it-IT | Codice |
Resource Url (100
)
Text[150]
Language | Caption |
---|---|
de-DE | Ressourcen-URL |
es-ES | URL del recurso |
en-US | Resource URL |
it-IT | URL risorsa |
Scope (110
)
Text[50]
Language | Caption |
---|---|
de-DE | Bereich |
es-ES | Ámbito |
en-US | Scope |
it-IT | Ambito |
Tenant Code (120
)
Code[20]
TableRelation: "M365 Authorization Tenant".Code
Language | Caption |
---|---|
de-DE | Tenantcode |
es-ES | Código de tenant |
en-US | Tenant Code |
it-IT | Codice 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
Obsolete
Pending: Use AcquireOAuth2V1AuthorizationToken with SecretText data type for returnAccessToken. (24.0)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
Obsolete
Pending: Use AcquireOAuth2V2AuthorizationToken with SecretText data type for returnAccessToken. (24.0)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.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.