Files
backstage/.changeset/giant-cheetahs-thank.md
T
Patrick Jungermann 8d9f673106 feat: add annotation microsoft.com/email when using the defaultUserTransformer.
This will allow users of the Microsoft auth provider to utilize the predefined
SignIn resolver instead of maintaining their own.

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2022-04-19 19:14:50 +02:00

690 B

@backstage/plugin-catalog-backend-module-msgraph
@backstage/plugin-catalog-backend-module-msgraph
patch

Add annotation microsoft.com/email when using the defaultUserTransformer.

This will allow users of the Microsoft auth provider to utilize the predefined SignIn resolver instead of maintaining their own.

// backend/plugins/auth.ts

// [...]

export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  return await createRouter({
    // [...]
    providerFactories: {
      microsoft: providers.microsoft.create({
        signIn: {
          resolver:
            providers.microsoft.resolvers.emailMatchingUserEntityAnnotation(),
        },
      }),
    },
  });
}