Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Sharepoint loginNames are not always emails #5

@skeskinen

Description

@skeskinen

Code that checks if user is admin IsUserExistInGroup (link below) assumes that loginName you get from Sharepoint looks like email, but I'm seeing something like: i:0#.f|membership|name@something.onmicrosoft.com

https://github.com/OfficeDev/Virtual-Health-Templates/blob/master/HealthCare.Core/Data/SharepointRepository.cs#L189

I fixed my problem by just splitting on | and taking the last piece, but there might be other formats too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions