Send guest passwords to sponsors in Microsoft Teams
With sponsors turned on, a self-registration portal asks each visitor who they are visiting. Airgate creates the guest account but does not show the password to the visitor. Instead, it sends the password to the chosen employee (the sponsor) as an Adaptive Card in a Microsoft Teams chat. The sponsor hands the password over, and that hand-over is the approval: a visitor nobody vouches for never gets online.
This guide sets up both sides: the Teams workflow that posts the card, and the portal and Teams settings in Airgate.
How it works
Section titled “How it works”Visitor Airgate Teams workflow Sponsor | registers on portal, | | | | picks "Jane Host" ------>| creates the guest account | | | | POST card + fields ----------->| "Post card in a | | | (workflow URL, JSON) | chat" as Flow bot | | "Ask your host for | |-------------------->| card with | your password" <-------| | | user name and | | password | <------------------------------- tells the visitor the password ------------------| | logs in with it -------->| login, MAC caching, CoA | |Points to know before you start:
- The sponsor list is per portal. You list each sponsor’s display name and e-mail address on the portal (up to 500). Visitors see the names in a drop-down; the e-mail address is never shown to them. The e-mail address must be the sponsor’s Teams sign-in name (UPN), because the workflow uses it as the chat recipient.
- There are no approve or deny buttons. The card carries the visitor’s details, user name and password. If the sponsor does not expect the visitor, they ignore the message and the visitor cannot log in.
- No approval timeout. The account exists from the moment the visitor registers and expires after the portal’s Account lifetime, whether or not the sponsor passed the password on.
- Only the sponsor receives the password. While sponsors are on, the portal ignores Show the credentials on the receipt page, and no e-mail or SMS receipt is sent to the visitor.
- Microsoft Graph cannot post one-to-one chat messages with application permissions, so Airgate does not talk to Teams directly. It calls a flow that you own in Teams Workflows or Power Automate.
Before you begin
Section titled “Before you begin”- A working guest portal of type Self-registration, with Accounts & devices › Password set to anything other than None (password-less). Sponsors need a password to send.
- In Airgate, an administrator role with the
guest:writepermission (Tenant Administrator, Network Administrator, Help Desk or Guest Operator). - In Microsoft 365, a user who can create flows in the Teams Workflows app or in Power Automate, in the same Microsoft 365 tenant as the sponsors. Plan to create the flow with a service or shared account rather than a personal one: the flow stops if its owner leaves.
- The list of sponsors: display name and Teams sign-in address of each person who may receive visitors.
Step 1: Create the workflow in Teams
Section titled “Step 1: Create the workflow in Teams”You can build the flow in the Teams Workflows app or at
make.powerautomate.com. Both create the same Power Automate cloud flow.
-
In Microsoft Teams, open Workflows (from Apps, or … in the left rail), then New flow › Create from blank. In Power Automate, create a new blank cloud flow instead.
-
Add the trigger When a Teams webhook request is received.
-
Set Who can trigger the flow to Anyone. Airgate calls the flow without a Microsoft sign-in; the secret signature in the URL is what protects it (see Keep the URL secret).
-
Add the action Post card in a chat or channel (Microsoft Teams connector) and set:
Field Value Post as Flow botPost in Chat with Flow botRecipient expression triggerBody()?['sponsor_email']Adaptive Card expression triggerBody()?['attachments'][0]['content']Enter the two values on the Expression tab of the dynamic content picker, not as plain text.
-
Save the flow. Open the trigger again and copy the HTTP POST URL that now appears. It starts with
https://and contains asig=signature.
What Airgate sends
Section titled “What Airgate sends”Airgate sends one HTTP POST with Content-Type: application/json. The body
is a Teams message with the Adaptive Card as its first attachment, plus the
same values as plain fields for your own flow logic:
{ "type": "message", "attachments": [{ "contentType": "application/vnd.microsoft.card.adaptive", "contentUrl": null, "content": { "type": "AdaptiveCard", "version": "1.4", "body": [ "…" ] } }], "sponsor_email": "jane.host@contoso.com", "sponsor_name": "Jane Host", "guest_name": "Ann Visitor", "guest_email": "ann@fabrikam.com", "guest_phone": "+15550100000", "guest_company": "Fabrikam", "username": "ann@fabrikam.com", "password": "48210937", "valid_until": "2026-11-20 17:30:00", "portal": "Corp-Guest"}The card shows the title Guest Wi-Fi request, a sentence saying the
visitor registered on the portal and named the sponsor as host, a fact list
(Visitor, Company, E-mail, Phone, Valid until: empty
values are left out), the Username and Password in a highlighted box,
and the footer “Sent by Airgate guest access”. valid_until is the account
expiry in the tenant time zone (Settings › General).
Step 2: Add the workflow URL to Airgate
Section titled “Step 2: Add the workflow URL to Airgate”- Open Guests › Guest accounts and select the Defaults tab.
- Scroll to the Microsoft Teams card.
- Turn on Teams delivery enabled.
- Paste the HTTP POST URL into Workflow URL. It must be an
https://URL. - Select Save on the card.
Airgate stores the URL encrypted. After saving, the field shows ********;
to change the URL, replace the masked value and save again.
Step 3: Send a test card
Section titled “Step 3: Send a test card”- On the same Microsoft Teams card, enter your own Teams sign-in address
in Send a test card (for example
alice@contoso.com). - Select Send test. The test always uses the saved settings, so save first.
You receive a card from Workflows (Flow bot) in Teams for a “Test
Visitor” of company “Airgate test” with the password 000000 (test). The
result badge under the field shows sent or failed with the reason.
Step 4: Turn on sponsors on the portal
Section titled “Step 4: Turn on sponsors on the portal”- Open Guests › Guest portal and open your self-registration portal.
- Select the Receipts section and scroll to Sponsors (Microsoft Teams).
- Turn on Visitors choose a sponsor; the password is sent to the sponsor in Microsoft Teams.
- Optional: change Question on the form. The default is
Who are you visiting?. - Add the sponsors under Sponsors:
- Add sponsor adds one row: Name (what visitors see, for example
Jane Host) and E-mail (Teams UPN) (for examplejane.host@contoso.com). - Paste list adds many at once, one per line, in any of these forms:
Jane Host <jane.host@contoso.com>,Jane Host, jane.host@contoso.comor justreception@contoso.com. Addresses already listed are skipped.
- Add sponsor adds one row: Name (what visitors see, for example
- Select Save changes.
Rules Airgate enforces on save: every row needs a valid e-mail address, a name can appear only once, a name is at most 128 characters, and the list holds at most 500 sponsors. A row without a name uses the e-mail address as its name.
What the visitor sees
Section titled “What the visitor sees”- The registration form shows the sponsor question as a required drop-down. A visitor who picks nothing gets “Please choose the person you are visiting.”
- After Register, the page Ask your host for your password says: “We have sent your Wi-Fi password to Jane Host on Microsoft Teams. Ask them for it, then log in below.” It contains the login form.
- If Teams delivery failed, the same page says: “We could not reach Jane Host right now. Please ask them or the reception desk for help; your registration is saved.”
- The visitor enters the password the sponsor gives them. From there the portal’s normal post-login action runs (MAC caching and CoA, or web login).
The guest account records the sponsor in Sponsor name and Sponsor e-mail, so Guests › Guest accounts can filter by Sponsor e-mail (or Sponsored by me).
Verify
Section titled “Verify”- Guests › Guest accounts › Delivery log: a row with Kind
Sponsor notice (Teams), ChannelTeams, Recipient the sponsor’s address and Statussent. Message bodies are never stored, so the password does not appear here. Rows are kept 180 days. - Guests › Guest accounts: the visitor’s account with the sponsor’s name.
- Power Automate › My flows › your flow › Run history: a successful run for each registration.
- Monitor › Sign-in log, protocol WebAuth: the visitor’s portal login once they enter the password.
Troubleshooting
Section titled “Troubleshooting”Teams delivery errors appear in the Detail column of the Delivery log and under Send a test card. Login errors appear in the Sign-in log and on the portal.
| Symptom | Cause | Fix |
|---|---|---|
Delivery log: Teams delivery is not configured (Guest settings › Microsoft Teams) |
Teams delivery enabled is off, or no URL is saved. | Complete Step 2. |
Delivery log: Teams workflow answered 401: … or 403 |
The trigger does not allow anonymous callers, or the URL’s signature is wrong (a truncated paste). | Set Who can trigger the flow to Anyone; copy the full HTTP POST URL again. |
Delivery log: Teams workflow answered 404: … |
The flow was deleted, or the URL belongs to an older version of the trigger. | Copy the current HTTP POST URL from the trigger and save it in Airgate. |
Delivery log: Teams workflow answered 400: … or the run fails in Power Automate |
The Recipient or Adaptive Card values were typed as text instead of expressions. | Re-enter both values on the Expression tab, save the flow, send a test card. |
Delivery log: Teams workflow unreachable: … |
Airgate could not open an HTTPS connection to the URL (DNS, firewall, or a timeout after 20 seconds). | Check that the URL is complete and that Airgate can reach *.logic.azure.com or the host in your URL. |
Status sent, but the sponsor gets nothing |
The flow ran but could not post: the recipient is not a Teams user in this Microsoft 365 tenant, or the flow’s run failed later. | Check the flow’s run history. Correct the sponsor’s E-mail (Teams UPN) on the portal. |
Saving the portal fails: Sponsors (password sent to a host in Microsoft Teams) need a password |
The portal’s Password is None (password-less). | Set Accounts & devices › Password to digits, letters, or letters and digits. |
Saving the portal fails: Add at least one sponsor (name and e-mail) |
Sponsors are on with an empty list. | Add a sponsor or turn sponsors off. |
| Sign-in log: Wrong password (WebAuth) | The visitor typed the password wrongly. | Ask the sponsor to read it again from the card. |
| Sign-in log: No account named “…” | The visitor used another user name than the one on the card (the user name is usually their e-mail address). | Use the Username shown on the card. |
| Sign-in log: The account has expired | The sponsor passed the password on after the account lifetime ended. | Extend the account (Guests › Guest accounts › Extend) or ask the visitor to register again. |
Keep the workflow URL secret
Section titled “Keep the workflow URL secret”The HTTP POST URL is a credential: anyone who has it can make your flow post
cards. Airgate stores it encrypted, never returns it in the API (it shows
********) and never writes it to its logs. Keep it out of tickets and
chats. If it leaks, delete the trigger (or the whole flow), create a new one,
and save the new URL in Airgate.