[Bug]: Several functions in codeunit 9010 "Azure AD User Management" do not return a value
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Describe the issue
See codeunit 9010 "Azure AD User Management" in BC29 preview
For example, this is a correct function:
[NonDebuggable]
procedure IsUserTenantAdmin(): Boolean
begin
exit(AzureADUserMgmtImpl.IsUserTenantAdmin());
end;
because the return value from the Implementation is passed on to a call to this function.
However, this is wrong for several other functions in this codeunit:
_[NonDebuggable]
procedure CreateNewUserFromGraphUser(GraphUserInfo: DotNet UserInfo)
begin
AzureADUserMgmtImpl.CreateNewUserFromGraphUser(GraphUserInfo);
end;_
and
_[NonDebuggable]
procedure SynchronizeAllLicensedUsersFromDirectory()
begin
AzureADUserMgmtImpl.SynchronizeAllLicensedUsersFromDirectory();
end;_
do NOT pass the return value from the Implementation function to another call. So, it is not possible to check whether the function was executed correctly.
Expected behavior
Change
AzureADUserMgmtImpl.CreateNewUserFromGraphUser(GraphUserInfo);
into
Exit(AzureADUserMgmtImpl.CreateNewUserFromGraphUser(GraphUserInfo));
and
AzureADUserMgmtImpl.SynchronizeAllLicensedUsersFromDirectory();
into
Exit(AzureADUserMgmtImpl.SynchronizeAllLicensedUsersFromDirectory();)
Steps to reproduce
/
Additional context
No response
I will provide a fix for a bug
- I will provide a fix for a bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in codeunit 9010 "Azure AD User Management" and compare each wrapper with its corresponding AzureADUserMgmtImpl function, beginning with CreateNewUserFromGraphUser and SynchronizeAllLicensedUsersFromDirectory. Confirm which functions return values, ensure the wrappers expose those results consistently, and verify the codeunit compiles and its existing checks pass.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100