You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-WebApp-OIDC/1-2-AnyOrg/NEW_README.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This sample shows how to build a .NET Core 2.2 MVC Web app that uses OpenID Conn
21
21

22
22
23
23
> This is the second chapter of the first phase of this ASP.NET Core Web App tutorial. Once you understand how to sign-in users in an ASP.NET Core Web App with Open Id Connect, can learn how to enable your [Web App to call a Web API on behalf of the signed-in user](../../2-WebApp-graph-user) in a later chapter.
24
-
> You can also sign-in users in your own Azure Active Directory organizations, and even with Microsoft personal accounts or social identities. For more details the parent directory's [Readme.md](../README.md)
24
+
> You can also sign-in users in your own Azure Active Directory organizations, and even with Microsoft personal accounts or social identities. For more details the parent directory's [Readme.md](../README.md)
25
25
26
26
## How to run this sample
27
27
@@ -44,6 +44,8 @@ or download and extract the repository .zip file.
44
44
45
45
### Step 2: Register the sample application with your Azure Active Directory tenant
46
46
47
+
> :warning:**If you had created this sample in the past already**: [Delete its **enterprise app** from the other tenants before re-creating this application](#error-AADSTS650051).
48
+
47
49
There is one project in this sample. To register it, you can:
48
50
49
51
- either follow the steps [Step 2: Register the sample with your Azure Active Directory tenant](#step-2-register-the-sample-with-your-azure-active-directory-tenant) and [Step 3: Configure the sample to use your Azure AD tenant](#choose-the-azure-ad-tenant-where-you-want-to-create-your-applications)
@@ -258,6 +260,16 @@ AuthenticationResult result = await confidentialClientApplication
258
260
.ConfigureAwait(false);
259
261
```
260
262
263
+
## Troubleshooting
264
+
265
+
### Error AADSTS650051
266
+
267
+
If you are receiving the following error message, you might need to **delete older Enterprise Applications**
268
+
269
+
> OpenIdConnectProtocolException: Message contains error: 'invalid_client', error_description: 'AADSTS650051: Application '{applicationId}' is requesting permissions that are either invalid or out of date.
270
+
271
+
If you had provisioned a service principle of this app in the past and created a new one, the tenants that had signed-in in the app might still have the previous service principle registered causing a conflict with the new one. The solution for the conflict is to delete the older service principle from each tenant in the **Enterprise Application** menu.
272
+
261
273
## Contributing
262
274
263
275
If you'd like to contribute to this sample, see [CONTRIBUTING.MD](/CONTRIBUTING.md).
0 commit comments