Open marstr opened 6 years ago
This has been open for sometime as Azure/azure-sdk-for-go#698.
As written by @chessman:
Graph API has Signed-in user operations: https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/signed-in-user-operations I use a workaround now: func Me(authorizer autorest.Authorizer) (graphrbac.User, error) { uclient := graphrbac.NewUsersClient("myorganization") uclient.Authorizer = authorizer req, _ := uclient.GetPreparer("") r := strings.NewReplacer("users", "me") req.URL.Path = r.Replace(req.URL.Path) resp, err := uclient.GetSender(req) if err != nil { return graphrbac.User{}, err } return uclient.GetResponder(resp) }
Graph API has Signed-in user operations: https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/signed-in-user-operations
I use a workaround now:
func Me(authorizer autorest.Authorizer) (graphrbac.User, error) { uclient := graphrbac.NewUsersClient("myorganization") uclient.Authorizer = authorizer req, _ := uclient.GetPreparer("") r := strings.NewReplacer("users", "me") req.URL.Path = r.Replace(req.URL.Path) resp, err := uclient.GetSender(req) if err != nil { return graphrbac.User{}, err } return uclient.GetResponder(resp) }
The right fix to this would be to add operations in the Swagger under a separate path.
Is this being fixed?
This has been open for sometime as Azure/azure-sdk-for-go#698.
As written by @chessman:
The right fix to this would be to add operations in the Swagger under a separate path.