You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- In https://entra.microsoft.com/ select Identity from the left bar menu.
148
-
- Next, go to "App Registration" in the left menu, and create a new one.
149
-
- Pay close attention to "Who can use this application or access this API?"
150
-
- This allows you to scope access to specific types of user accounts
151
-
- Only your tenant, all Microsoft tenants, or all Microsoft tenants and public Microsoft accounts (Skype, Xbox, Outlook.com, etc.)
152
-
- When asked for a redirection URL, use `https://yourapplication.com/api/auth/callback/microsoft-entra-id` or for development `http://localhost:3000/api/auth/callback/microsoft-entra-id`.
153
-
- After your App Registration is created, under "Client Credential" create your Client secret.
154
-
- Now copy your:
155
-
- Application (client) ID
156
-
- Client secret (value)
157
-
- Issuer
158
-
159
-
In `.env.local` create the following entries:
160
-
161
-
```
162
-
AUTH_MICROSOFT_ENTRA_ID_ID=<copy Application (client) ID here>
163
-
AUTH_MICROSOFT_ENTRA_ID_SECRET=<copy generated client secret value here>
164
-
AUTH_MICROSOFT_ENTRA_ID_ISSUER=https://login.microsoftonline.com/<copy the issuer here>/v2.0
165
-
```
196
+
## Notes
166
197
167
-
That will default the tenant to use the `common` authorization endpoint. [For more details see here](https://learn.microsoft.com/en-us/entra/identity-platform/v2-protocols#endpoints).
198
+
- If the issuer paramater is not set it will default to
199
+
`https://login.microsoftonline.com/common/v2.0`.
168
200
169
-
- Microsoft Entra returns the profile picture in an ArrayBuffer, instead of just a URL to the image, so our provider converts it to a base64 encoded image string and returns that instead. See: https://learn.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0&tabs=http#examples. The default image size is 48x48 to avoid [running out of space](https://next-auth.js.org/faq#:~:text=What%20are%20the%20disadvantages%20of%20JSON%20Web%20Tokens%3F) in case the session is saved as a JWT.
201
+
- Microsoft Entra returns the profile picture in an ArrayBuffer, instead of
202
+
just a URL to the image, so our provider converts it to a base64 encoded
0 commit comments