Rahul solanki
Rahul solanki

Reputation: 31

Adding Azure AD Authentication to the project failed: System.Runtime.InteropServices.COMException

While configuring azure AD from visual studio, I'm getting this error:

Adding Azure AD Authentication to the project failed: System.Runtime.InteropServices.COMException

I found that it's due to writeback option not enabled on Azure AD, but I verified against Azure AD - it's properly set. This issue is coming only when I'm using app id uri to configure but when I'm using client id it's working fine.

image of error message

Upvotes: 0

Views: 1082

Answers (2)

Alessandro Lallo
Alessandro Lallo

Reputation: 761

In my case the issue was the server settings on the project. The project was linked to a local site on IIS. Removing the link and changing the setting to IIS Express fixed the issue

enter image description here

Upvotes: 4

Nan Yu
Nan Yu

Reputation: 27528

You should use client id , client id represents your application and is unique identifier for the application.App ID URI are used when requesting permissions to a resource application, or acquiring an access token for a resource application.

Please refer to AAD Graph Application object schema for more details on these https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/entity-and-complex-type-reference#application-entity . Check the appId and identifierUris properties.

Upvotes: -1

Related Questions