Skip to content

Commit a044a5c

Browse files
Merge pull request #279181 from craigshoemaker/patch-11
[Static Web Apps] Update: User information (freshness)
2 parents febbb56 + ef02f07 commit a044a5c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/static-web-apps/user-information.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: static-web-apps
55
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: conceptual
8-
ms.date: 04/09/2021
8+
ms.date: 06/25/2024
99
ms.author: cshoe
1010
ms.custom:
1111
---
@@ -20,20 +20,20 @@ Many user interfaces rely heavily on user authentication data. The direct-access
2020

2121
Client principal data object exposes user-identifiable information to your app. The following properties are featured in the client principal object:
2222

23-
| Property | Description |
24-
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
25-
| `identityProvider` | The name of the [identity provider](authentication-authorization.yml). |
26-
| `userId` | An Azure Static Web Apps-specific unique identifier for the user. <ul><li>The value is unique on a per-app basis. For instance, the same user returns a different `userId` value on a different Static Web Apps resource.<li>The value persists for the lifetime of a user. If you delete and add the same user back to the app, a new `userId` is generated.</ul> |
27-
| `userDetails` | Username or email address of the user. Some providers return the [user's email address](authentication-authorization.yml), while others send the [user handle](authentication-authorization.yml). |
28-
| `userRoles` | An array of the [user's assigned roles](authentication-authorization.yml). |
29-
| `claims` | An array of claims returned by your [custom authentication provider](authentication-custom.md). Only accessible in the direct-access endpoint. |
23+
| Property | Description |
24+
|---|---|
25+
| `identityProvider` | The name of the [identity provider](authentication-authorization.yml). |
26+
| `userId`| An Azure Static Web Apps-specific unique identifier for the user. <ul><li>The value is unique on a per-app basis. For instance, the same user returns a different `userId` value on a different Static Web Apps resource.<li>The value persists for the lifetime of a user. If you delete and add the same user back to the app, a new `userId` is generated.</ul> |
27+
| `userDetails` | Username or email address of the user. Some providers return the [user's email address](authentication-authorization.yml), while others send the [user handle](authentication-authorization.yml). |
28+
| `userRoles` | An array of the [user's assigned roles](authentication-authorization.yml). |
29+
| `claims` | An array of claims returned by your [custom authentication provider](authentication-custom.md). Only accessible in the direct-access endpoint. |
3030

3131
The following example is a sample client principal object:
3232

3333
```json
3434
{
3535
"identityProvider": "github",
36-
"userId": "d75b260a64504067bfc5b2905e3b8182",
36+
"userId": "abcd12345abcd012345abcdef0123450",
3737
"userDetails": "username",
3838
"userRoles": ["anonymous", "authenticated"],
3939
"claims": [{
@@ -103,7 +103,7 @@ console.log(await getUser());
103103

104104
# [C#](#tab/csharp)
105105

106-
In a C# function, the user information is available from the `x-ms-client-principal` header which can be deserialized into a `ClaimsPrincipal` object, or your own custom type. The following code demonstrates how to unpack the header into an intermediary type, `ClientPrincipal`, which is then turned into a `ClaimsPrincipal` instance.
106+
In a C# function, the user information is available from the `x-ms-client-principal` header which your app can deserialize into a `ClaimsPrincipal` object, or your own custom type. The following code demonstrates how to unpack the header into an intermediary type, `ClientPrincipal`, which is then turned into a `ClaimsPrincipal` instance.
107107

108108
```csharp
109109
using System;

0 commit comments

Comments
 (0)