Azure / Azure/azure-rest-api-specs

graphrbac doesn't have signed-in use (me) operations

Open
#2,647 1 comment 0 reactions 0 assignees View on GitHub
Graph Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

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:
> ```go
> 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.

Contributor guide

Open the contributing guide

Research direction

Start with the linked signed-in user operations documentation and the graphrbac UsersClient workaround, then compare them with the existing graphrbac specification. Add the signed-in user operations under a separate Swagger/OpenAPI path, with completion defined by the specification exposing the documented `me` operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, openapi
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.