Forum Discussion
Cannot login using ServicePrincipal: Application was not found in the directory
- Jan 18, 2018
I got an error on the password, below was successful for me
$principalPassword = ConvertTo-SecureString "mypassword123" -AsPlainText -Force New-AzureRmADSpCredential -ServicePrincipalName https://domain.com/xxxxxxxxxxxxx -Password $principalPassword $applicationid ="d35a3b69-98f8-4dbb-abf8-1660ed11fadd" $psCred = New-Object System.Management.Automation.PSCredential($applicationid, $principalPassword) Add-AzureRmAccount -Credential $psCred -ServicePrincipal -TenantId 6f0ebec4-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx
Hello Roy,
When you set the credential was it successful?
New-AzureRmADSpCredential -ServicePrincipalName https://mydomain.com/0f7b7873-2354-48ad-9ee4-9e6cfefd04d4 -Password "mypassword"
Hi Hannel,
It did not show any error message when issuing that command.
- Hannel HazeleyJan 18, 2018Iron Contributor
I got an error on the password, below was successful for me
$principalPassword = ConvertTo-SecureString "mypassword123" -AsPlainText -Force New-AzureRmADSpCredential -ServicePrincipalName https://domain.com/xxxxxxxxxxxxx -Password $principalPassword $applicationid ="d35a3b69-98f8-4dbb-abf8-1660ed11fadd" $psCred = New-Object System.Management.Automation.PSCredential($applicationid, $principalPassword) Add-AzureRmAccount -Credential $psCred -ServicePrincipal -TenantId 6f0ebec4-xxxx-xxxx-xxxx-xxxxxxxxxxxxxxxxx
- Roy HochstenbachJan 18, 2018Copper Contributor
I'm getting the following error message:
Add-AzureRmAccount : AADSTS50001: The application named https://login.microsoftonline.com/696c6a65-a325-4af4-bfc4-f67a88425e4b/ was not found in the tenant named 696c6a65-a325-4af4-bfc4-f67a88425e4b. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You might have sent your authentication request to the wrong tenant.
I've triple checked that I'm using the correct application ID, principle name and tenant ID.
- Hannel HazeleyJan 18, 2018Iron Contributor
Not sure what's going on, can you send a screenshot of the process like I did?
Don't forget to block out tenant and application if they are in production.
Also you can get/confirm you tenant name from the Active Directory section.