Azure-Samples / Azure-Samples/ms-identity-ciam-javascript-tutorial
1-Authentication/6-sign-in-node-cli-app : Configure.ps1 script error - attempts to assign owner when owner is null
- Dominant language
- PowerShell
- Stars
- 75
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
original code:
```
if ($owner -eq $null)
{
New-MgApplicationOwnerByRef -ApplicationId $currentAppObjectId -BodyParameter @{"@odata.id" = "https://graph.microsoft.com/v1.0/directoryObjects/$user.ObjectId"}
Write-Host "'$($user.UserPrincipalName)' added as an application owner to app '$($clientServicePrincipal.DisplayName)'"
}
```
should be
```
if ($owner -ne $null)
```
Contributor guide
Research direction
Open Configure.ps1 and inspect the owner check around New-MgApplicationOwnerByRef. Compare the current null check with the issue's requested behavior, then verify that the script no longer takes the incorrect owner-assignment path when owner is null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100