TL;DR
1. Register the app
- In the Microsoft Entra admin center, open Identity, then Applications, then App registrations, and press New registration.
- Fill in the form:
- Press Register.
2. Make a client secret
- In the app registration, open Certificates & secrets, then Client secrets, and press New client secret.
- Give it a description and an expiry, and press Add.
- Copy the Value at once: Entra ID shows it only now. The Secret ID is not the secret.
Note the expiry. When the secret expires, sign-in stops; make a new one and paste it into Plotwork before then.
3. Send the address in the ID token
- Open API permissions and check that Microsoft Graph has the delegated permissions
openid, email and profile. Add the ones that are missing, and grant admin consent.
- Open Token configuration, press Add optional claim, choose ID as the token type, tick
email, and press Add.
Entra ID puts the address in the email claim only for a person whose account has a mail address. An account with no mailbox has none, so for a token from your tenant with no email claim, Plotwork reads the user principal name instead: the upn claim, then preferred_username. Either way the address must be on a domain your organisation verified in Plotwork.
4. Copy the values into Plotwork
- On the app registration's Overview, copy the Application (client) ID and the Directory (tenant) ID.
- In Plotwork, open your organisation's Single sign-on tab and fill in Identity provider:
- Press Save provider, then turn on Sign in with single sign-on.
Plotwork refuses the shared issuers /common, /organizations and /consumers: they would let any Microsoft tenant's people in. Use your own tenant's issuer, as above.
Or connect with SAML 2.0
- In the Microsoft Entra admin center, open Identity, then Applications, then Enterprise applications, press New application, then Create your own application. Name it
Plotwork, choose Integrate any other application you don't find in the gallery (Non-gallery), and press Create.
- Open Single sign-on and choose SAML.
- In Plotwork's Single sign-on tab, choose SAML 2.0 under Identity provider, then edit Basic SAML Configuration in Entra ID:
- Under Attributes & Claims, edit Unique User Identifier (Name ID): set Name identifier format to Email address and Source attribute to
user.mail. If your people's mail is empty and their user principal name is their address, use user.userprincipalname instead.
- Under SAML Certificates, keep Signing Option at Sign SAML assertion and Signing Algorithm at SHA-256, and copy the App Federation Metadata Url.
- In Plotwork, paste it under Metadata URL, leave Email attribute empty, and press Save provider. Then turn on Sign in with single sign-on.
- Under Users and groups, assign the people or groups who should sign in.
If you keep a Name ID that is not an address, put http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress under Email attribute in Plotwork: Entra ID sends the mail address in that claim by default.
Entra ID rotates the signing certificate before it expires. When it does, save the provider in Plotwork again with the same metadata URL.
Provisioning with SCIM
- In Plotwork's Single sign-on tab, under Provisioning with SCIM, press Make token and copy the token and the SCIM base URL.
- In the Microsoft Entra admin center, open the Plotwork enterprise application (for an OIDC app registration, make a Non-gallery enterprise application for provisioning), then Provisioning, and press Get started.
- Set Provisioning Mode to Automatic and fill in Admin Credentials:
- Press Test Connection, then Save.
- Under Mappings, open Provision Microsoft Entra ID Users and check that
userPrincipalName (or mail) maps to userName and Switch([IsSoftDeleted], , "False", "True", "True", "False") maps to active. Remove mappings to attributes Plotwork does not keep if you like: it ignores them.
- Under Users and groups, assign the people and groups to provision, set Provisioning Status to On, and save. Entra ID runs a cycle about every 40 minutes; Provision on demand runs one person at once.
- In Plotwork, choose the role each pushed group gives under Groups and roles.
Troubleshooting
See also