Lier l’identité Azure Active Directory à votre propre fournisseur d’identité (aperçu)Link Azure Active Directory identity with your own identity provider (Preview)
Les actions action. http dans les messages actionnables incluent un jeton émis par AAD dans l' Authorization
en-tête, qui fournit des informations sur l’identité de l’utilisateur.Action.Http actions in actionable messages include an AAD-issued token in the Authorization
header, which provides information about the user's identity. Toutefois, ces informations ne sont peut-être pas suffisantes pour authentifier l’utilisateur auprès de votre service.However, this information may not be sufficient to authenticate the user to your service. Avec la liaison d’identité, vous pouvez indiquer au client Outlook de présenter l’interface utilisateur pour permettre à l’utilisateur de s’authentifier auprès de votre service.With identity linking, you can signal the Outlook client to present UI to allow the user to authenticate with your service. Une fois que l’utilisateur s’authentifie, vous pouvez associer son identité AAD à votre propre pour permettre une authentification transparente pour les demandes futures.Once the user authenticates, you can associate their AAD identity with your own to allow for seamless authentication for future requests.
Utilisation de la liaison d’identitéUsing identity linking
Votre service peut déclencher l’authentification sur n’importe quel Action.Http
point de terminaison d’action en renvoyant une 401 Unauthorized
réponse avec un ACTION-AUTHENTICATE
en-tête.Your service can trigger authentication on any Action.Http
action endpoint by returning a 401 Unauthorized
response with a ACTION-AUTHENTICATE
header. L’en-tête contient l’URL d’authentification de votre service.The header contains the authentication URL for your service.
Une fois l’authentification terminée, redirigez la demande vers l’URL spécifiée dans l' Identity-Linking-Redirect-Url
en-tête envoyé dans la demande d’origine.Once authentication is completed, redirect the request to the URL specified in the Identity-Linking-Redirect-Url
header sent in the original request.
Flux de liaison d’identitéIdentity linking flow
Demande initiale adressée à votre point de terminaison d’actionInitial request to your action endpoint
Les serveurs Microsoft envoient une demande POST initiale à votre point de terminaison d’action.Microsoft servers send an initial POST request to your action endpoint.
POST https://api.contoso.com/myEndpoint
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6...
Identity-Linking-Redirect-Url: https://outlook.office.com/connectors/adelev@contoso.com/723a1c49-f8dc-4063-843e-d4c2b7180b8b/postAuthenticate
Content-Type: application/json
{
// action body
}
Votre service valide le jeton JWT et extrait l’identité de l’utilisateur de la sub
revendication.Your service validates the JWT token and extracts the user's identity from the sub
claim.
{
...
"sub": "AdeleV@contoso.com",
"aud": "https://api.contoso.com"
}
Votre service ne trouve aucun utilisateur avec une identité liée de AdeleV@contoso.com
sorte qu’il conserve Identity-Linking-Redirect-Url
la valeur d’en-tête et renvoie une 401
réponse.Your service finds no user with a linked identity of AdeleV@contoso.com
so it persists Identity-Linking-Redirect-Url
header value and returns a 401
response.
Notes
La méthode exacte que vous utilisez pour conserver l’URL de redirection à partir de l' Identity-Linking-Redirect-Url
en-tête dépend de votre implémentation.The exact method you use to persist the redirect URL from the Identity-Linking-Redirect-Url
header is dependent on your implementation. Si votre service utilise OAuth, vous pouvez l’enregistrer dans le state
paramètre, par exemple.If your service uses OAuth, you may save it in the state
parameter, for example.
HTTP/1.1 401 Unauthorized
ACTION-AUTHENTICATE: https://identity.contoso.com/authenticate?state=https://outlook.office.com/connectors/adelev@contoso.com/723a1c49-f8dc-4063-843e-d4c2b7180b8b/postAuthenticate
Demande d’authentificationAuthentication request
Une fois qu’Outlook reçoit l' 401
ACTION-AUTHENTICATE
en-tête, il ouvre un volet Office et accède à l’URL à partir de l’en-tête.After Outlook receives the 401
with the ACTION-AUTHENTICATE
header, it will open a task pane and navigate to the URL from the header.
GET https://identity.contoso.com/authenticate?state=https://outlook.office.com/connectors/adelev@contoso.com/723a1c49-f8dc-4063-843e-d4c2b7180b8b/postAuthenticate
Votre service authentifie l’utilisateur et associe l’identité fournie par le jeton émis par AAD avec l’utilisateur dans votre système.Your service authenticates the user and associates the identity provided by the AAD-issued token with the user in your system. Une fois terminé, le service redirige la demande vers l’URL à partir de l' Identity-Linking-Redirect-Url
en-tête.Once complete, the service redirects the request to the URL from the Identity-Linking-Redirect-Url
header.
HTTP/1.1 302 Found
Location: https://outlook.office.com/connectors/adelev@contoso.com/723a1c49-f8dc-4063-843e-d4c2b7180b8b/postAuthenticate
Nouvelle tentativeRetry action
Une fois qu’Outlook a reçu la redirection de votre serveur d’authentification, il relance immédiatement la demande d’origine.After Outlook receives the redirect back from your authentication server, it immediately retries the original request. Cette fois, étant donné que vous avez associé l’identité AAD à votre propre, votre point de terminaison traite la demande normalement.This time, because you've associated the AAD identity with your own, your endpoint processes the request normally.
ExempleExample
Vous pouvez utiliser l’exemple de carte suivant dans la suite de cartes pour voir cette opération en action.You can use the following sample card in the Card Playground to see this in action. Le point de terminaison de cette carte vous invite à vous connecter à la plateforme d’identité Microsoft et (avec votre consentement) à effectuer une demande de graphique pour obtenir votre profil.The endpoint in this card will prompt you to login to the Microsoft identity platform and (with your consent) will make a Graph request to get your profile. Le code de ce point de terminaison est disponible sous forme d’échantillon sur GitHub.The code for this endpoint is available as a sample on GitHub.
{
"hideOriginalBody": true,
"type": "AdaptiveCard",
"padding": "none",
"body": [
{
"type": "TextBlock",
"text": "Identity Linking Demo"
},
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Http",
"method": "POST",
"url": "https://amidentitylinking.azurewebsites.net/action",
"body": "{}",
"title": "Get User Details",
"isPrimary": true
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
Feuille de route de prise en charge des clientsClient support roadmap
La liaison d’identité est disponible pour un ensemble limité de clients, avec la prise en charge de la fonctionnalité ajoutée à l’avenir.Identity linking is available to a limited set of clients, with support for the feature being added in the future. Le tableau suivant indique la chronologie approximative.The following table provides the approximate timeline.
ClientClient | DisponibilitéAvailability |
---|---|
Office 365 ProPlusOffice 365 ProPlus | AvailableAvailable |
Outlook sur le web pour Office 365Outlook on the web for Office 365 | Bientôt disponibleComing soon |
Outlook sur iOSOutlook on iOS | Bientôt disponibleComing soon |
Outlook sur AndroidOutlook on Android | Bientôt disponibleComing soon |
Outlook sur MacOutlook on Mac | À déterminerTBD |
RessourcesResources
- Exigences de sécurité pour les messages appelant une action dans Office 365Security requirements for actionable messages in Office 365
- Conception de cartes de message actionnables d’Outlook au format de carte adaptativeDesigning Outlook Actionable Message cards with the Adaptive Card format
- Exemple de service de liaison d’identitéSample identity linking service