@extends('layouts.app') @section('header')
Checks the client ID, secret and tenant against Entra and throws the token away. Read-only: nothing is sent and no message is posted.
It cannot check Graph access. Every call this integration makes is delegated — made as the sending account — so those permissions only exist once that account has signed in and consented.
@unless ($configured) Client ID, tenant ID and secret must all be saved first. @endunlessSign in as the account the messages should come from — not as yourself, unless that is genuinely the sender. It grants the delegated scopes once and Worklance keeps the connection alive from there.
@if ($configured && blank($company->ms_redirect_uri)) Set the redirect URI above first. @endif @endifOn the customer's app registration, under API permissions — all delegated, none needing admin consent:
openid, profile, email — sign the account inoffline_access — keep it signed in without a person presentUser.Read — read the sending account's own profileUser.ReadBasic.All — resolve a recipient by email addressChat.Create, Chat.ReadWrite,
ChatMessage.Send — open a 1:1 chat and post to it
No application permissions, and specifically not
User.Read.All. An app-only token cannot post to a 1:1 chat
as a person, which is the entire point of sending as the bot account.
A new registration needs admin consent once. These
permissions say "admin consent required: no", but most tenants let a
non-admin consent only to a short low-impact list, which
Chat.* and User.ReadBasic.All are not on. Until
someone presses Grant admin consent on the registration, signing
in shows "Need admin approval" rather than a consent prompt. A
registration that already had it granted never shows either.
Sign-in asks for exactly these nine and nothing else. A registration may
well list more — ChatMessage.Read often is — but asking for
one beyond what an admin already consented to reopens consent, and most
tenants only let a non-admin consent to a short list, so the extra scope
shows up as Need admin approval instead of signing in.