-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graph::CreateUser - Unable to specify correct UserCreationContext #33
Comments
Thanks @tiwood , this is an issue where Go's lack of inheritance makes this difficult to address in the code generator. This is going to affect any method that accepts different subclasses as input. Fortunately there are not a lot of methods that fall into this category. I have a plan on how to fix this, but not sure when I will be able to get to it. Can you give me an idea of the priority of this particular issue for your application? Thanks, |
The |
@tedchamb is it possible to change the signature of the CreateUser method as follows (making parameter func (client *ClientImpl) CreateUser(ctx context.Context, args interface{}) (*GraphUser, error) { and then checking in the method body for valid struct types? |
@tedchamb as we have the same issue with creating Groups via the Graph API I wanted to use the // Arguments for the CreateGroups function
type CreateGroupsArgs struct {
// (required)
Container interface{}
} But because an |
I attempted to fix this in the latest 7.1 release by providing by providing more variants of the methods each accepting different context. I added such "overloads" for both Users and Groups, I was able to call create user successfully with that. |
To create a user with
graph.CreateUser
we have to provideCreateUserArgs
:The CreationContext decides if we create an
aad
,ad
ormsa
account, but the current implementation only allows us to use the following context (which shouldn't be used):Instead we should be able to provide one of the following:
The text was updated successfully, but these errors were encountered: